#include <config.h>
-#ident "$Id$"
-
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
/* Options */
static bool read_only = false;
static bool sort_mode = false;
+static bool silence_warnings = false;
/* local function prototypes */
static void fail_exit (int status);
" but do not change files\n"), usageout);
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
(void) fputs (_(" -s, --sort sort entries by UID\n"), usageout);
+ (void) fputs (_(" -S, --silence-warnings silence controversial/paranoid warnings\nn"), usageout);
(void) fputs ("\n", usageout);
exit (status);
}
{
int c;
static struct option long_options[] = {
- {"help", no_argument, NULL, 'h'},
- {"quiet", no_argument, NULL, 'q'},
- {"read-only", no_argument, NULL, 'r'},
- {"root", required_argument, NULL, 'R'},
- {"sort", no_argument, NULL, 's'},
+ {"help", no_argument, NULL, 'h'},
+ {"quiet", no_argument, NULL, 'q'},
+ {"read-only", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
+ {"silence-warnings", no_argument, NULL, 'S'},
+ {"sort", no_argument, NULL, 's'},
{NULL, 0, NULL, '\0'}
};
/*
* Parse the command line arguments
*/
- while ((c = getopt_long (argc, argv, "hqrR:s",
+ while ((c = getopt_long (argc, argv, "hqrR:sS",
long_options, NULL)) != -1) {
switch (c) {
case 'h':
case 's':
sort_mode = true;
break;
+ case 'S':
+ silence_warnings = true;
+ break;
default:
usage (E_USAGE);
}
break;
}
}
- if (*other_pmem == NULL) {
+ if (!silence_warnings && *other_pmem == NULL) {
printf
("'%s' is a member of the '%s' group in %s but not in %s\n",
*pmem, groupname, file, other_file);