diff options
author | Karel Zak <kzak@redhat.com> | 2006-12-07 00:25:44 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2006-12-07 00:25:44 +0100 |
commit | 66ee8158b69525e12060ef558cb5d77feadab1dc (patch) | |
tree | 08b30f2d07df9213f5647bc6f60b5090a263ef43 /sys-utils/cytune.c | |
parent | 22853e4a82c6ef7b336527529acb94b14a0b0fd8 (diff) | |
download | util-linux-old-66ee8158b69525e12060ef558cb5d77feadab1dc.tar.gz |
Imported from util-linux-2.10s tarball.
Diffstat (limited to 'sys-utils/cytune.c')
-rw-r--r-- | sys-utils/cytune.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys-utils/cytune.c b/sys-utils/cytune.c index 0bc0c5cb..63ca0e4e 100644 --- a/sys-utils/cytune.c +++ b/sys-utils/cytune.c @@ -101,21 +101,21 @@ static int global_argc, global_optind; static char ***global_argv; static void -summary(int signal) { +summary(int sig) { struct cyclades_control *cc; - int argc, optind; + int argc, local_optind; char **argv; int i,j; argc = global_argc; argv = *global_argv; - optind = global_optind; + local_optind = global_optind; - if (signal > 0) { - for(i = optind; i < argc; i ++) { - j = i - optind; + if (sig > 0) { + for(i = local_optind; i < argc; i ++) { + j = i - local_optind; cc = &cmon[cmon_index]; fprintf(stderr, _("File %s, For threshold value %lu, Maximum characters in fifo were %d,\nand the maximum transfer rate in characters/second was %f\n"), argv[i], @@ -127,9 +127,9 @@ summary(int signal) { exit(0); } cc = &cmon[cmon_index]; - if (cc->threshold_value > 0 && signal != -1) { + if (cc->threshold_value > 0 && sig != -1) { fprintf(stderr, _("File %s, For threshold value %lu and timrout value %lu, Maximum characters in fifo were %d,\nand the maximum transfer rate in characters/second was %f\n"), - argv[cmon_index+optind], + argv[cmon_index+local_optind], cc->threshold_value, cc->timeout_value, cc->maxmax, @@ -170,8 +170,6 @@ int main(int argc, char *argv[]) { struct cyclades_monitor cywork; int i; - extern char *optarg; - extern int optind; unsigned long threshold_value; unsigned long timeout_value; double xfer_rate; |