]> xenbits.xensource.com Git - people/dstodden/blktap.git/commitdiff
blktap2: Output tapdisk state in hex, consistently.
authorDaniel Stodden <daniel.stodden@citrix.com>
Tue, 29 Jun 2010 20:03:09 +0000 (13:03 -0700)
committerDaniel Stodden <daniel.stodden@citrix.com>
Tue, 29 Jun 2010 20:03:09 +0000 (13:03 -0700)
control/tap-ctl.c

index 80fc933a895ae4be15987017c56c5cdce0de888d..fe3c672419adc27152d37fb589db34469d60d685 100644 (file)
@@ -62,7 +62,7 @@ tap_ctl_list_row(tap_list_t *entry)
                sprintf(minor_str, "%d", entry->minor);
 
        if (entry->state != -1)
-               sprintf(state_str, "%x", entry->state);
+               sprintf(state_str, "%#x", entry->state);
 
        printf("%8s %2s %4s %10s %s\n",
               pid_str, minor_str, state_str,
@@ -86,7 +86,7 @@ tap_ctl_list_dict(tap_list_t *entry)
 
        if (entry->state != -1) {
                if (d) putc(' ', stdout);
-               d = printf("state=%d", entry->state);
+               d = printf("state=%#x", entry->state);
        }
 
        if (entry->type && entry->path) {