/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
-/* missing type from C language */
-
-#include <errno.h>
-#ifdef AFS_AIX32_ENV
-#include <signal.h>
-#undef _NONSTD_TYPES
-#endif
-#include <stdio.h>
-#include <unistd.h>
#include <afs/afs_args.h>
-#include <sys/param.h>
-#ifdef AFS_SUN5_ENV
-#include <fcntl.h>
-#endif
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <sys/time.h>
#define VIRTUE
#define VICE
-#include <sys/ioctl.h>
#include <afs/vice.h>
#undef VIRTUE
#undef VICE
-#include <sys/ioctl.h>
-#include <netdb.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
#include <afs/venus.h>
#include <afs/sys_prototypes.h>
#include <afs/afsutil.h>
{
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
while (argc > 0 && *argv[0] == '-') {
char *cp = *argv;
+ if (strlen(cp) > 2) {
+ goto badoption;
+ }
+
switch (*++cp) {
case 'v':
verbose = 1;
break;
default:
- fprintf(stderr, "Unknown option: '%c'\n", *cp);
+ cp--;
+
+ badoption:
+ fprintf(stderr, "Unknown option: '%s'\n", cp);
fprintf(stderr, USAGE);
exit(1);
}
if (s1.st_size != s2.st_size) {
fprintf(stderr,
"WARNING: New file %s is %u bytes long; should be %u\n",
- file2, (unsigned int) s2.st_size,
+ file2, (unsigned int) s2.st_size,
(unsigned int) s1.st_size);
}
}
*/
}
}
- return 4;
}