Handle minors like ls(1) does it.
PR: 19179 Submitted by: Kelly Yancey <kbyanc@posi.net>
This commit is contained in:
parent
f1e80bc1c2
commit
6ed3a29777
@ -270,8 +270,14 @@ T_dev_t(int l2, void *p)
|
||||
dev_t *d = (dev_t *)p;
|
||||
if (l2 != sizeof *d)
|
||||
err(1, "T_dev_T %d != %d", l2, sizeof *d);
|
||||
if ((int)(*d) != -1) {
|
||||
if (minor(*d) > 255 || minor(*d) < 0)
|
||||
printf("{ major = %d, minor = 0x%x }",
|
||||
major(*d), minor(*d));
|
||||
else
|
||||
printf("{ major = %d, minor = %d }",
|
||||
major(*d), minor(*d));
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user