From 50f27779b68fb36cdc2ed4d929c8d97a0f69fe9f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 27 Jun 2019 13:27:01 -0700 Subject: 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. --- toys/other/stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/other') 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"; -- cgit v1.2.3