diff options
author | Bruce Evans <bde@FreeBSD.org> | 2000-01-06 14:40:10 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2000-01-06 14:40:10 +0000 |
commit | 029b2bd09ef6ef123e610a248b67fdf1156e5f17 (patch) | |
tree | 2c2d5c1d91b0c365118ed477413875bd36ea49fb /bin | |
parent | a519749105033b67585a1e3c7d4e30bd2bf845fa (diff) | |
download | src-029b2bd09ef6ef123e610a248b67fdf1156e5f17.tar.gz src-029b2bd09ef6ef123e610a248b67fdf1156e5f17.zip |
Print negative minor numbers in hex. Negative minor numbers are
essentially large unsigned ones, and we already print minor
numbers > 255 in hex.
Notes
Notes:
svn path=/head/; revision=55514
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ls/print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 584a517a4926..702b6b1ccc97 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -110,9 +110,10 @@ printlong(dp) if (f_flags) (void)printf("%-*s ", dp->s_flags, np->flags); if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode)) - if (minor(sp->st_rdev) > 255) + if (minor(sp->st_rdev) > 255 || minor(sp->st_rdev) < 0) (void)printf("%3d, 0x%08x ", - major(sp->st_rdev), minor(sp->st_rdev)); + major(sp->st_rdev), + (u_int)minor(sp->st_rdev)); else (void)printf("%3d, %3d ", major(sp->st_rdev), minor(sp->st_rdev)); |