Module Name:    src
Committed By:   sborrill
Date:           Wed Jul  1 12:19:45 UTC 2020

Modified Files:
        src/usr.sbin/hdaudioctl: hdaudioctl.c

Log Message:
When using show subcommand, display node ID (nid) in hexadecimal to match
the HD audio documentation. Diverge slightly by using 0xXX instead of XXh
format for consistency with the list subcommand.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/hdaudioctl/hdaudioctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/hdaudioctl/hdaudioctl.c
diff -u src/usr.sbin/hdaudioctl/hdaudioctl.c:1.4 src/usr.sbin/hdaudioctl/hdaudioctl.c:1.5
--- src/usr.sbin/hdaudioctl/hdaudioctl.c:1.4	Mon Jun 15 20:29:29 2020
+++ src/usr.sbin/hdaudioctl/hdaudioctl.c	Wed Jul  1 12:19:45 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudioctl.c,v 1.4 2020/06/15 20:29:29 riastradh Exp $ */
+/* $NetBSD: hdaudioctl.c,v 1.5 2020/07/01 12:19:45 sborrill Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <supp...@precedence.co.uk>
@@ -292,9 +292,9 @@ hdaudioctl_show(int fd, int argc, char *
 	array = prop_dictionary_get(response, "pin-config");
 	iter = prop_array_iterator(array);
 	prop_object_iterator_reset(iter);
-	printf("nid Data     As Seq Device         Conn  Jack    "
+	printf("nid  Data     As Seq Device         Conn  Jack    "
 	    "Location   Color   Misc\n");
-	printf("================================================="
+	printf("=================================================="
 	    "=======================\n");
 	while ((obj = prop_object_iterator_next(iter)) != NULL) {
 		dict = (prop_dictionary_t)obj;
@@ -305,7 +305,7 @@ hdaudioctl_show(int fd, int argc, char *
 		jack = pin_jacks[(config >> 16) & 0xf];
 		loc = pin_locations[(config >> 24) & 0x3f];
 		color = pin_colors[(config >> 12) & 0xf];
-		printf("%3d %08X %2d %3d %-14s %-5s %-7s %-10s %-7s %4X\n",
+		printf("0x%2X %08X %2d %3d %-14s %-5s %-7s %-10s %-7s %4X\n",
 		    nid, config, ((config >> 4U) & 0xf), (config & 0xf),
 		    device, conn, jack, loc, color, ((config >> 8U) & 0xf));
 	}

Reply via email to