From a1fd212bc6b05d4b6fe74b9c0e5258165cea41d4 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 3 Feb 2010 00:25:17 +0000 Subject: [PATCH] Make twiddle build Update the twiddle utility (for manipulating rx settings in the Unix CM) so that it builds with error checking enabled. Also, add the binary to the gitignore file in that directory. Change-Id: I5c19832579db139e5c558b3488d7c49fdb7c08c4 Reviewed-on: http://gerrit.openafs.org/1222 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/venus/.gitignore | 1 + src/venus/twiddle.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/venus/.gitignore b/src/venus/.gitignore index 8a2780e..34f3440 100644 --- a/src/venus/.gitignore +++ b/src/venus/.gitignore @@ -11,3 +11,4 @@ /kdump /kdump64 /livesys +/twiddle diff --git a/src/venus/twiddle.c b/src/venus/twiddle.c index e1a6a24..94a98fb 100644 --- a/src/venus/twiddle.c +++ b/src/venus/twiddle.c @@ -36,14 +36,12 @@ #include #include #include +#include #define MAXINSIZE 1300 /* pioctl complains if data is larger than this */ #define VMSGSIZE 128 /* size of msg buf in volume hdr */ -static char space[AFS_PIOCTL_MAXSIZE]; -static char tspace[1024]; -static struct ubik_client *uclient; - +static void Die(int code, char *filename); static char pn[] = "fs"; static int rxInitDone = 0; @@ -126,9 +124,8 @@ Twiddle(struct cmd_syndesc *as, void *arock) #include "AFS_component_version_number.c" -main(argc, argv) - int argc; - char **argv; +int +main(int argc, char **argv) { register afs_int32 code; register struct cmd_syndesc *ts; @@ -168,9 +165,8 @@ main(argc, argv) exit(code); } -Die(code, filename) - int code; - char *filename; +static void +Die(int code, char *filename) { /*Die */ if (errno == EINVAL) { -- 1.9.4