mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Print negative minor numbers in hex. Negative minor numbers are
essentially large unsigned ones, and we already print minor numbers > 255 in hex.
This commit is contained in:
parent
a519749105
commit
029b2bd09e
1 changed files with 3 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue