bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48960: stat v8.30 - device number in decimal shown as 16bit number i


From: Paul Eggert
Subject: bug#48960: stat v8.30 - device number in decimal shown as 16bit number instead of to converted 8bit
Date: Fri, 11 Jun 2021 10:11:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]