1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-15 03:41:57 +02:00

stat: use decomposed decimal device numbers by default

* src/stat.c (default_format): Use decomposed decimal
representation (major,minor) in the default format.
This is least ambiguous for human interpretation,
and more consistent with ls for example.
Fixes https://bugs.gnu.org/48960
This commit is contained in:
Pádraig Brady
2021-06-20 21:26:21 +01:00
parent 4a8278229e
commit 5f8e6fc202
2 changed files with 5 additions and 2 deletions

3
NEWS
View File

@@ -63,6 +63,9 @@ GNU coreutils NEWS -*- outline -*-
for 8-bit non-ASCII alphabetic characters. TeX indexes should
instead use '\usepackage[latin1]{inputenc}' or equivalent.
stat will use decomposed (major,minor) device numbers in its default format.
This is less ambiguous, and more consistent with ls.
** New Features
expr and factor now support bignums on all platforms.

View File

@@ -1677,7 +1677,7 @@ default_format (bool fs, bool terse, bool device)
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
format = xasprintf ("%s%s", format, _("\
" "Device: %Dh/%dd\tInode: %-10i Links: %-5h Device type: %t,%T\n\
" "Device: %Hd,%Ld\tInode: %-10i Links: %-5h Device type: %Hr,%Lr\n\
"));
}
else
@@ -1685,7 +1685,7 @@ default_format (bool fs, bool terse, bool device)
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
format = xasprintf ("%s%s", format, _("\
" "Device: %Dh/%dd\tInode: %-10i Links: %h\n\
" "Device: %Hd,%Ld\tInode: %-10i Links: %h\n\
"));
}
free (temp);