- struct stat statBuf;
- if (stat("/etc/fstab", &statBuf) < 0)
- fprintf(stderr, "/etc/fstab file missing -- Please install one.\n\n");
-
- if (strcmp(*argv, "swapon")==0) {
- appName = *argv;
- whichApp = SWAPON_APP;
-
- } else {
- appName = *argv;
- whichApp = SWAPOFF_APP;
- }
-
- if (argc < 2)
- goto usage_and_exit;
- argc--;
- argv++;
-
- /* Parse any options */
- while (**argv == '-') {
- while (*++(*argv)) switch (**argv) {
- case 'a':
- do_em_all();
- break;
- default:
+ if (strcmp(applet_name, "swapon") == 0) {
+ whichApp = SWAPON_APP;
+ } else {
+ whichApp = SWAPOFF_APP;
+ }
+
+ if (argc != 2) {