GNU bug report logs -
#48960
stat v8.30 - device number in decimal shown as 16bit number instead of to converted 8bit
Previous Next
Reported by: wolfgang.rohm <at> arcor.de
Date: Fri, 11 Jun 2021 14:58:03 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 48960 <at> debbugs.gnu.org (full text, mbox):
The stat output is confusing in other ways. For example:
507-day $ ls -ld .; stat . | grep Device
drwxr-xr-x 4 eggert eggert 12288 May 5 14:48 .
Device: 10300h/66304d Inode: 70388429 Links: 4
508-day $ ls -ld /dev/ptp0; stat /dev/ptp0 | grep Device
crw------- 1 root root 246, 0 Jun 3 13:09 /dev/ptp0
Device: 5h/5d Inode: 321 Links: 1 Device type: f6,0
As you write, that "66304d" is useless on my platform, and the "5h/5d"
uses a completely different notation from the "f6,0".
I suggest that we change the behavior of both "Device:" and "Device
type:" to be consistent with that of 'ls', so that the output becomes:
507-day $ ls -ld .; stat . | grep Device
drwxr-xr-x 4 eggert eggert 12288 May 5 14:48 .
Device: 259, 0 Inode: 70388429 Links: 4
508-day $ ls -ld /dev/ptp0; stat /dev/ptp0 | grep Device
crw------- 1 root root 246, 0 Jun 3 13:09 /dev/ptp0
Device: 0, 5 Inode: 321 Links: 1 Device type: 246, 0
This bug report was last modified 3 years and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.