aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-06-27 13:27:01 -0700
committerRob Landley <rob@landley.net>2019-06-28 09:33:31 -0500
commit50f27779b68fb36cdc2ed4d929c8d97a0f69fe9f (patch)
tree93141d5c491ddb66cad84bd94a282c28ed01a865 /toys/other
parentccf574ecc4dd8af8fd045a9d6bbaf5e8bf66a8d2 (diff)
downloadtoybox-50f27779b68fb36cdc2ed4d929c8d97a0f69fe9f.tar.gz
file, stat: various small improvements.
file now shows the target of a symbolic link and calls out broken symbolic links. file now shows the device type for block/character special files. file now shows specific reason when it can't open. stat now includes the device type, plus a little more space between the number of blocks and the human-readable file type. Adjusted tests accordingly, which actually makes more of them pass on the host as a convenient side-effect, but I actually made these changes because I've been finding the desktop file and stat output more convenient in these cases.
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/stat.c b/toys/other/stat.c
index c4c1bf42..66c5dc3b 100644
--- a/toys/other/stat.c
+++ b/toys/other/stat.c
@@ -191,8 +191,8 @@ void stat_main(void)
"Block Size: %s Fundamental block size: %S\n"
"Blocks: Total: %b\tFree: %f\tAvailable: %a\n"
"Inodes: Total: %c\tFree: %d"
- : " File: %N\n Size: %s\t Blocks: %b\t IO Blocks: %B\t%F\n"
- "Device: %Dh/%dd\t Inode: %i\t Links: %h\n"
+ : " File: %N\n Size: %s\t Blocks: %b\t IO Blocks: %B\t %F\n"
+ "Device: %Dh/%dd\t Inode: %i\t Links: %h\t Device type: %t,%T\n"
"Access: (0%a/%A)\tUid: (%5u/%8U)\tGid: (%5g/%8G)\n"
"Access: %x\nModify: %y\nChange: %z";