Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/hdaudioctl When using show subcommand, display node...



details:   https://anonhg.NetBSD.org/src/rev/5193908d4999
branches:  trunk
changeset: 935394:5193908d4999
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Wed Jul 01 12:19:45 2020 +0000

description:
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.

diffstat:

 usr.sbin/hdaudioctl/hdaudioctl.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 8097256c6255 -r 5193908d4999 usr.sbin/hdaudioctl/hdaudioctl.c
--- a/usr.sbin/hdaudioctl/hdaudioctl.c  Wed Jul 01 09:58:29 2020 +0000
+++ b/usr.sbin/hdaudioctl/hdaudioctl.c  Wed Jul 01 12:19:45 2020 +0000
@@ -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 <support%precedence.co.uk@localhost>
@@ -292,9 +292,9 @@
        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 @@
                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));
        }



Home | Main Index | Thread Index | Old Index