| stat(1): include birth time in GNU format. |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/archive3/public/freebsd-releng-10.4-src/usr.bin/stat/stat.c freebsd-10.4/usr.bin/stat/stat.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/usr.bin/stat/stat.c 2017-09-29 08:21:20.000000000 +0800 |
| +++ freebsd-10.4/usr.bin/stat/stat.c 2019-08-18 10:00:46.916093676 +0800 |
| @@ -102,14 +102,15 @@ |
| "st_uid=%u st_gid=%g st_rdev=%r st_size=%z " \ |
| "st_atime=%a st_mtime=%m st_ctime=%c " SHELL_B \ |
| "st_blksize=%k st_blocks=%b" SHELL_F |
| -#define LINUX_FORMAT \ |
| +#define GNU_FORMAT \ |
| " File: \"%N\"%n" \ |
| " Size: %-11z FileType: %HT%n" \ |
| " Mode: (%OMp%03OLp/%.10Sp) Uid: (%5u/%8Su) Gid: (%5g/%8Sg)%n" \ |
| "Device: %Hd,%Ld Inode: %i Links: %l%n" \ |
| "Access: %Sa%n" \ |
| "Modify: %Sm%n" \ |
| - "Change: %Sc" |
| + "Change: %Sc%n" \ |
| + " Birth: %SB" |
| |
| #define TIME_FORMAT "%b %e %T %Y" |
| |
| @@ -298,9 +299,11 @@ |
| statfmt = SHELL_FORMAT; |
| break; |
| case 'x': |
| - statfmt = LINUX_FORMAT; |
| - if (timefmt == NULL) |
| - timefmt = "%c"; |
| + statfmt = GNU_FORMAT; |
| + if (timefmt == NULL) { |
| + //timefmt = "%c"; |
| + timefmt = "%F %T %z"; |
| + } |
| break; |
| default: |
| usage(synopsis); |