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 committed 2021-06-21 12:03:42 +01:00
1 parent 4a8278229e
commit 5f8e6fc202
2 files changed
+5 -2

No files matched your search

+3
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.
+2 -2
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);