[PATCH] Re: bin/59320: Using ls -h (on FBSD 5.x) causes unaligned
formatting
Ryan Sommers
ryans at gamersimpact.com
Fri Nov 21 13:40:25 PST 2003
The following reply was made to PR bin/59320; it has been noted by GNATS.
From: Ryan Sommers <ryans at gamersimpact.com>
To: freebsd-gnats-submit at FreeBSD.org, mbadolato at cybernox.com
Cc:
Subject: [PATCH] Re: bin/59320: Using ls -h (on FBSD 5.x) causes unaligned formatting
Date: Fri, 21 Nov 2003 15:30:50 -0600
Patch to fix formatting. I don't see why the "-1" was added, but taking it out
of the printing seems to do the trick, I tested it on a few different
directory structures and seems to work.
--- /usr/src/bin/ls/print.c Wed Nov 19 21:04:58 2003
+++ /usr/src/bin/ls/print.c Fri Nov 21 15:01:25 2003
@@ -626,7 +626,7 @@
if (dbytes == 0)
(void)printf("%*s ", (u_int)width, "0B");
else
- (void)printf("%*.*f%c ", (u_int)width - 1,
+ (void)printf("%*.*f%c ", (u_int)width,
dbytes > 10 ? 0 : 1, dbytes, "BKMGTPE"[unit]);
} else
(void)printf("%*jd ", (u_int)width, bytes);
--
Ryan "leadZERO" Sommers
Gamer's Impact President
ryans at gamersimpact.com
ICQ: 1019590
AIM/MSN: leadZERO
-= http://www.gamersimpact.com =-
More information about the freebsd-bugs
mailing list