From: Sergey Poznyakoff Date: Sun, 24 Jan 2010 14:52:24 +0000 (+0200) Subject: Improve handling of --test-label. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=28f2669b15f2ddf5a25e4d7a7f36023ae0268c8b;hp=28f2669b15f2ddf5a25e4d7a7f36023ae0268c8b;p=chaz%2Ftar Improve handling of --test-label. * src/list.c (print_volume_label): New function. (print_header): Call print_volume_label. (test_archive_label): New function. * src/buffer.c (VOLUME_LABEL_APPEND): Remove. (VOLUME_TEXT, VOLUME_TEXT_LEN): New macros (drop_volume_label_suffix): New function. (check_label_pattern): Use drop_volume_label_suffix. * src/common.h (subcommand): New constant TEST_LABEL_SUBCOMMAND. (test_label_option): Remove. (drop_volume_label_suffix): New proto. (test_archive_label): New proto. * src/names.c (all_names_found): Remove test for test_label_option. * src/tar.c (subcommand_string): Handle TEST_LABEL_SUBCOMMAND. (set_subcommand_option): Improve diagnostics. (parse_opt): Set subcommand if --test-label is given. (main): Handle TEST_LABEL_SUBCOMMAND. ---