+ st_size = 0;
+ st_offset = -1;
+ st_count = 0;
+ if (argc == 3 && strcmp(argv[1], "-d") == 0) {
+ /* for compatibility with the existing positional parameter
+ * usage */
+ fname = argv[2];
+ optind = 2;
+ } else if (argc == 5 &&
+ (argv[2][0] != '-' || isdigit(argv[2][1])) &&
+ (argv[3][0] != '-' || isdigit(argv[3][1])) &&
+ (argv[4][0] != '-' || isdigit(argv[4][1])) ) {
+ /* for compatibility with the existing positional parameter
+ * usage */
+ fname = argv[1];
+ stripe_size_arg = argv[2];
+ stripe_off_arg = argv[3];
+ stripe_count_arg = argv[4];
+ optind = 4;
+ } else {
+ while ((c = getopt_long(argc, argv, "c:di:s:",
+ long_opts, NULL)) >= 0)
+ {
+ switch (c) {
+ case 0:
+ /* Long options. */
+ break;
+ case 'c':
+ stripe_count_arg = optarg;
+ break;
+ case 'd':
+ /* delete the default striping pattern */
+ delete = 1;
+ break;
+ case 'i':
+ stripe_off_arg = optarg;
+ break;
+ case 's':
+ stripe_size_arg = optarg;
+ break;
+ case '?':
+ return CMD_HELP;
+ default:
+ fprintf(stderr, "error: %s: option '%s' "
+ "unrecognized\n",
+ argv[0], argv[optind - 1]);
+ return CMD_HELP;
+ }
+ }