]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commitdiff
Beautify the listing of registered gwjobs (cangw -L).
authorOliver Hartkopp <socketcan@hartkopp.net>
Mon, 22 Feb 2010 18:57:45 +0000 (18:57 +0000)
committerOliver Hartkopp <socketcan@hartkopp.net>
Mon, 22 Feb 2010 18:57:45 +0000 (18:57 +0000)
cangw.c

diff --git a/cangw.c b/cangw.c
index c03535c658e84a51a943e6758fb9daf48eb90750..b7fde0d4ce3a1bf8890b3c647aff4ba18ecc4a9a 100644 (file)
--- a/cangw.c
+++ b/cangw.c
@@ -99,7 +99,7 @@ void printfilter(const void *data)
 {
        struct can_filter *filter = (struct can_filter *)data;
 
-       printf("-f %X:%X ", filter->can_id, filter->can_mask);
+       printf("-f %03X:%X ", filter->can_id, filter->can_mask);
 }
 
 void printmod(const char *type, const void *data)
@@ -120,7 +120,7 @@ void printmod(const char *type, const void *data)
        if (mod.modtype & CGW_MOD_DATA)
                printf("D");
 
-       printf(":%X.%X.", mod.cf.can_id, mod.cf.can_dlc);
+       printf(":%03X.%X.", mod.cf.can_id, mod.cf.can_dlc);
 
        for (i = 0; i < 8; i++)
                printf("%02X", mod.cf.data[i]);