linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Haynes <loghyr@gmail.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs@vger.kernel.org, Tom Haynes <tdh@excfb.com>
Subject: [PATCH 2/2] Make the stat command handle leading blank spaces
Date: Wed, 22 Jun 2011 21:26:07 -0500	[thread overview]
Message-ID: <1308795967-7605-3-git-send-email-tdh@excfb.com> (raw)
In-Reply-To: <1308795967-7605-1-git-send-email-tdh@excfb.com>


Signed-off-by: Tom Haynes <tdh@excfb.com>
---
 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


  parent reply	other threads:[~2011-06-23  2:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  2:26 [PATCH 0/2] minor patches to cthon tests for FreeBSD Tom Haynes
2011-06-23  2:26 ` [PATCH 1/2] Multiple clnt_broadcast, rename static reference Tom Haynes
2011-06-23  2:26 ` Tom Haynes [this message]
2011-06-27 16:23 ` [PATCH 0/2] minor patches to cthon tests for FreeBSD Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308795967-7605-3-git-send-email-tdh@excfb.com \
    --to=loghyr@gmail.com \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tdh@excfb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).