"Try to restore files from a damaged filesystem (unmounted)",
"",
"-s|--snapshots get snapshots",
- "-x|--xattr get extended attributes",
+ "-x|--xattr restore extended attributes",
"-m|--metadata restore owner, mode and times",
- "-S|--symlinks restore symbolic links",
+ "-S|--symlink restore symbolic links",
"-v|--verbose verbose",
"-i|--ignore-errors ignore errors",
"-o|--overwrite overwrite",
while (1) {
int opt;
+ enum { GETOPT_VAL_PATH_REGEX = 256 };
static const struct option long_options[] = {
- { "path-regex", required_argument, NULL, 256},
+ { "path-regex", required_argument, NULL,
+ GETOPT_VAL_PATH_REGEX },
{ "dry-run", no_argument, NULL, 'D'},
{ "metadata", no_argument, NULL, 'm'},
{ "symlinks", no_argument, NULL, 'S'},
case 'c':
match_cflags |= REG_ICASE;
break;
- /* long option without single letter alternative */
- case 256:
+ case GETOPT_VAL_PATH_REGEX:
match_regstr = optarg;
break;
case 'x':