2011-06-23 02:25:54

by Thomas Haynes

[permalink] [raw]
Subject: [PATCH 0/2] minor patches to cthon tests for FreeBSD

First allows FreeBSD 9.0 to compile and second allows
for leading space in the time output.

Tom Haynes (2):
Multiple clnt_broadcast, rename static reference
Make the stat command handle leading blank spaces

general/stat.c | 4 +++-
tools/pmapbrd.c | 7 ++++---
2 files changed, 7 insertions(+), 4 deletions(-)

--
1.7.3.4



2011-06-23 02:26:00

by Thomas Haynes

[permalink] [raw]
Subject: [PATCH 2/2] Make the stat command handle leading blank spaces


Signed-off-by: Tom Haynes <[email protected]>
---
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


2011-06-27 16:23:32

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH 0/2] minor patches to cthon tests for FreeBSD



On 06/22/2011 10:26 PM, Tom Haynes wrote:
> First allows FreeBSD 9.0 to compile and second allows
> for leading space in the time output.
>
> Tom Haynes (2):
> Multiple clnt_broadcast, rename static reference
> Make the stat command handle leading blank spaces
>
> general/stat.c | 4 +++-
> tools/pmapbrd.c | 7 ++++---
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
Both committed on the git://linux-nfs.org/~steved/exports/cthon04 tree

steved.

2011-06-23 02:25:57

by Thomas Haynes

[permalink] [raw]
Subject: [PATCH 1/2] Multiple clnt_broadcast, rename static reference


Signed-off-by: Tom Haynes <[email protected]>
---
tools/pmapbrd.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/pmapbrd.c b/tools/pmapbrd.c
index c447ced..2bb05b6 100644
--- a/tools/pmapbrd.c
+++ b/tools/pmapbrd.c
@@ -98,7 +98,7 @@ static bool_t xdr_rmtcallres ARGS_((XDR *, struct rmtcallres *));
#define RPROC_NUM (u_long)1
#endif

-static enum clnt_stat clnt_broadcast ARGS_((int, unsigned long, unsigned long,
+static enum clnt_stat clnt_broadcast_time ARGS_((int, unsigned long, unsigned long,
unsigned long, xdrproc_t, void *, xdrproc_t, void *,
resultproc_t, struct timeval *));

@@ -174,7 +174,7 @@ main(argc, argv)
* XXX shouldn't have to cast eachresult?
*/
clnt_stat =
- clnt_broadcast(sock, RPROG, RVERS, RPROC_NUM, xdr_void, &a,
+ clnt_broadcast_time(sock, RPROG, RVERS, RPROC_NUM, xdr_void, &a,
xdr_void, &b, (resultproc_t)eachresult, &t);
if(clnt_stat != RPC_TIMEDOUT) {
printf("error: clnt_stat = %d\n", clnt_stat);
@@ -305,7 +305,8 @@ getbroadcastnets(sock, buf)
}

static enum clnt_stat
-clnt_broadcast(sock, prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult, t)
+clnt_broadcast_time(sock, prog, vers, proc, xargs, argsp, xresults,
+ resultsp, eachresult, t)
int sock;
#ifdef SVR3
ulong prog; /* program number */
--
1.7.3.4