bsdtar->create_compression = opt;
#else
bsdtar_warnc(bsdtar, 0,
- "lzma compression not supported by this version of bsdtar");
+ "xz compression not supported by this version of bsdtar");
usage(bsdtar);
#endif
break;
/* GNU tar 1.13 used -l for --one-file-system */
bsdtar->option_warn_links = 1;
break;
+ case OPTION_LZMA:
+#if HAVE_LIBLZMA
+ if (bsdtar->create_compression != '\0')
+ bsdtar_errc(bsdtar, 1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+#else
+ bsdtar_warnc(bsdtar, 0,
+ "lzma compression not supported by this version of bsdtar");
+ usage(bsdtar);
+#endif
+ break;
case 'm': /* SUSv2 */
bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_TIME;
break;
case 'x': /* SUSv2 */
set_mode(bsdtar, opt);
break;
- case OPTION_XZ:
-#if HAVE_LIBLZMA
- if (bsdtar->create_compression != '\0')
- bsdtar_errc(bsdtar, 1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
-#else
- bsdtar_warnc(bsdtar, 0,
- "xz compression not supported by this version of bsdtar");
- usage(bsdtar);
-#endif
- break;
case 'y': /* FreeBSD version of GNU tar */
#if HAVE_LIBBZ2
if (bsdtar->create_compression != '\0')
{ "keep-newer-files", 0, OPTION_KEEP_NEWER_FILES },
{ "keep-old-files", 0, 'k' },
{ "list", 0, 't' },
- { "lzma", 0, 'J' },
+ { "lzma", 0, OPTION_LZMA },
{ "modification-time", 0, 'm' },
{ "newer", 1, OPTION_NEWER_CTIME },
{ "newer-ctime", 1, OPTION_NEWER_CTIME },
{ "use-compress-program", 1, OPTION_USE_COMPRESS_PROGRAM },
{ "verbose", 0, 'v' },
{ "version", 0, OPTION_VERSION },
- { "xz", 0, OPTION_XZ },
+ { "xz", 0, 'J' },
{ NULL, 0, 0 }
};