diff options
author | Jim Meyering <jim@meyering.net> | 2004-04-04 16:22:26 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-04-04 16:22:26 +0000 |
commit | c0c9569dc42512150d91358f4a794ab187326cc8 (patch) | |
tree | 416f548d761696e5ce841524a2136fe2b52b4e9a /src | |
parent | c2afe164accbc122072c1de293cb1d7b09d544cf (diff) | |
download | coreutils-c0c9569dc42512150d91358f4a794ab187326cc8.tar.xz |
A specified format is no longer automatically newline terminated.
If you want a newline at the end of your format, use `\n'.
(print_it): Don't print a newline at the end of
every format.
(do_statfs): Add a newline at end of each default format string.
Diffstat (limited to 'src')
-rw-r--r-- | src/stat.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/stat.c b/src/stat.c index 527ccf2fe..cf2dd0fbe 100644 --- a/src/stat.c +++ b/src/stat.c @@ -610,7 +610,6 @@ print_it (char const *masterformat, char const *filename, } free (format); free (dest); - fputc ('\n', stdout); } /* stat the filesystem and print what we find */ @@ -630,11 +629,11 @@ do_statfs (char const *filename, int terse, char const *format) if (format == NULL) { format = (terse - ? "%n %i %l %t %b %f %a %s %c %d" + ? "%n %i %l %t %b %f %a %s %c %d\n" : " File: \"%n\"\n" " ID: %-8i Namelen: %-7l Type: %T\n" "Blocks: Total: %-10b Free: %-10f Available: %-10a Size: %s\n" - "Inodes: Total: %-10c Free: %-10d"); + "Inodes: Total: %-10c Free: %-10d\n"); } print_it (format, filename, print_statfs, &statfsbuf); @@ -660,7 +659,7 @@ do_stat (char const *filename, int follow_links, int terse, { if (terse != 0) { - format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o"; + format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o\n"; } else { @@ -674,7 +673,7 @@ do_stat (char const *filename, int follow_links, int terse, "Device: %Dh/%dd\tInode: %-10i Links: %-5h" " Device type: %t,%T\n" "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n" - "Access: %x\n" "Modify: %y\n" "Change: %z"; + "Access: %x\n" "Modify: %y\n" "Change: %z\n"; } else { @@ -683,7 +682,7 @@ do_stat (char const *filename, int follow_links, int terse, " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n" "Device: %Dh/%dd\tInode: %-10i Links: %h\n" "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n" - "Access: %x\n" "Modify: %y\n" "Change: %z"; + "Access: %x\n" "Modify: %y\n" "Change: %z\n"; } } } |