/*
* Short options for cpio. Please keep this sorted.
*/
-static const char *short_options = "06AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuVvW:yZz";
+static const char *short_options = "067AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuVvW:yZz";
/*
* Long options for cpio. Please keep this sorted.
int equivalent; /* Equivalent short option. */
} cpio_longopts[] = {
{ "b64encode", 0, OPTION_B64ENCODE },
+ { "binary", 0, '7' },
{ "create", 0, 'o' },
{ "dereference", 0, 'L' },
{ "dot", 0, 'V' },
case '0': /* GNU convention: --null, -0 */
cpio->option_null = 1;
break;
- case '6': /* 6th edition (PWB) interpretation of file mode bits */
+ case '6': /* in/out: assume/create 6th edition (PWB) format */
cpio->option_pwb = 1;
+ cpio->format = "pwb";
+ break;
+ case '7': /* out: create archive using 7th Edition binary format */
+ cpio->format = "bin";
break;
case 'A': /* NetBSD/OpenBSD */
cpio->option_append = 1;
}
if (r < ARCHIVE_WARN)
lafe_errc(1, 0, "Requested filter not available");
- if (cpio->option_pwb)
- cpio->format = "pwb";
r = archive_write_set_format_by_name(cpio->archive, cpio->format);
if (r != ARCHIVE_OK)
lafe_errc(1, 0, "%s", archive_error_string(cpio->archive));