aboutsummaryrefslogtreecommitdiff
path: root/coreutils/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/stat.c')
-rw-r--r--coreutils/stat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/coreutils/stat.c b/coreutils/stat.c
index a8393468e..1e93dce80 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -190,6 +190,7 @@ FS_TYPE(0x012FF7B4, "xenix") \
190FS_TYPE(0x012FF7B5, "sysv4") \ 190FS_TYPE(0x012FF7B5, "sysv4") \
191FS_TYPE(0x012FF7B6, "sysv2") \ 191FS_TYPE(0x012FF7B6, "sysv2") \
192FS_TYPE(0x012FF7B7, "coh") \ 192FS_TYPE(0x012FF7B7, "coh") \
193IF_PLATFORM_MINGW32(FS_TYPE(0x15013346, "udf")) \
193FS_TYPE(0x00011954, "ufs") \ 194FS_TYPE(0x00011954, "ufs") \
194FS_TYPE(0x012FD16D, "xia") \ 195FS_TYPE(0x012FD16D, "xia") \
195FS_TYPE(0x5346544e, "ntfs") \ 196FS_TYPE(0x5346544e, "ntfs") \
@@ -313,6 +314,7 @@ static void FAST_FUNC print_stat(char *pformat, const char m,
313 struct passwd *pw_ent; 314 struct passwd *pw_ent;
314 struct group *gw_ent; 315 struct group *gw_ent;
315 316
317#if ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_READLINK2
316 if (m == 'n') { 318 if (m == 'n') {
317 printfs(pformat, filename); 319 printfs(pformat, filename);
318 } else if (m == 'N') { 320 } else if (m == 'N') {
@@ -326,6 +328,10 @@ static void FAST_FUNC print_stat(char *pformat, const char m,
326 } else { 328 } else {
327 printf(pformat, filename); 329 printf(pformat, filename);
328 } 330 }
331#else
332 if (m == 'n' || m == 'N') {
333 printfs(pformat, filename);
334#endif
329 } else if (m == 'd') { 335 } else if (m == 'd') {
330 strcat(pformat, "llu"); 336 strcat(pformat, "llu");
331 printf(pformat, (unsigned long long) statbuf->st_dev); 337 printf(pformat, (unsigned long long) statbuf->st_dev);
@@ -709,8 +715,10 @@ static bool do_stat(const char *filename, const char *format)
709 gw_ent = getgrgid(statbuf.st_gid); 715 gw_ent = getgrgid(statbuf.st_gid);
710 pw_ent = getpwuid(statbuf.st_uid); 716 pw_ent = getpwuid(statbuf.st_uid);
711 717
718#if ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_READLINK2
712 if (S_ISLNK(statbuf.st_mode)) 719 if (S_ISLNK(statbuf.st_mode))
713 linkname = xmalloc_readlink_or_warn(filename); 720 linkname = xmalloc_readlink_or_warn(filename);
721#endif
714 if (linkname) { 722 if (linkname) {
715 printf(" File: '%s' -> '%s'\n", filename, linkname); 723 printf(" File: '%s' -> '%s'\n", filename, linkname);
716 free(linkname); 724 free(linkname);