[PATCH 2/2] Make the stat command handle leading blank spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tom Haynes <tdh@xxxxxxxxx>
---
 general/stat.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/general/stat.c b/general/stat.c
index 2ce604e..b9128ae 100644
--- a/general/stat.c
+++ b/general/stat.c
@@ -52,7 +52,9 @@ getnewch:
 		exit(1);
 	}
 	c = i & 0x7f;
-	if (c == '\n' || c == '\r' || c == 'r')
+	if (c == ' ' || c == '\t')
+		goto getnewch;
+	else if (c == '\n' || c == '\r' || c == 'r')
 		attfmt = 1;
 	else if (isdigit(c))
 		fmt = "%lf %*s %lf %*s %lf %*s";	/* BSD fmt */
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux