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 #17 received at 48960 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 12/06/2021 16:19, Pádraig Brady wrote:
> We could take the FreeBSD approach which is:
>
> %Hd major device number in decimal (st_dev)
> %Ld minor device number in decimal (st_dev)
> %Hr major device type in decimal (st_rdev)
> %Lr minor device type in decimal (st_rdev)
>
> Note I'd be inclined to not have a space between major,minor in default stat output,
> as there should be no ambiguity with locale formatted numbers, which could be
> the case with ls. For example, my ls alias uses thousands grouping with:
> alias ls="BLOCK_SIZE=\'1 ls --color=auto".
> I.e. the default format would from stat would be
> Device: %Hd,%Ld ..... Device type: %Hr,%Lr
>
> For consistency if we provided the above we should also probably provide:
>
> %r (composed) device type in decimal (st_rdev)
> %R (composed) device type in hex (st_rdev)
The attached adds the new formats.
I'll follow up with another to adjust the default output accordingly.
cheers,
Pádraig
[stat-device-formats.diff (text/x-patch, attachment)]
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.