Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/archival/ar.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 38  static void FAST_FUNC header_verbose_lis Line 38  static void FAST_FUNC header_verbose_lis
38  #define AR_OPT_INSERT 0x40  #define AR_OPT_INSERT 0x40
39    
40  int ar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;  int ar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
41  int ar_main(int argc, char **argv)  int ar_main(int argc UNUSED_PARAM, char **argv)
42  {  {
43   static const char msg_unsupported_err[] ALIGN1 =   static const char msg_unsupported_err[] ALIGN1 =
44   "archive %s is not supported";   "archive %s is not supported";
# Line 51  int ar_main(int argc, char **argv) Line 51  int ar_main(int argc, char **argv)
51   /* Prepend '-' to the first argument if required */   /* Prepend '-' to the first argument if required */
52   opt_complementary = "--:p:t:x:-1:p--tx:t--px:x--pt";   opt_complementary = "--:p:t:x:-1:p--tx:t--px:x--pt";
53   opt = getopt32(argv, "ptxovcr");   opt = getopt32(argv, "ptxovcr");
54     argv += optind;
55    
56   if (opt & AR_CTX_PRINT) {   if (opt & AR_CTX_PRINT) {
57   archive_handle->action_data = data_extract_to_stdout;   archive_handle->action_data = data_extract_to_stdout;
# Line 62  int ar_main(int argc, char **argv) Line 63  int ar_main(int argc, char **argv)
63   archive_handle->action_data = data_extract_all;   archive_handle->action_data = data_extract_all;
64   }   }
65   if (opt & AR_OPT_PRESERVE_DATE) {   if (opt & AR_OPT_PRESERVE_DATE) {
66   archive_handle->ah_flags |= ARCHIVE_PRESERVE_DATE;   archive_handle->ah_flags |= ARCHIVE_RESTORE_DATE;
67   }   }
68   if (opt & AR_OPT_VERBOSE) {   if (opt & AR_OPT_VERBOSE) {
69   archive_handle->action_header = header_verbose_list_ar;   archive_handle->action_header = header_verbose_list_ar;
# Line 74  int ar_main(int argc, char **argv) Line 75  int ar_main(int argc, char **argv)
75   bb_error_msg_and_die(msg_unsupported_err, "insertion");   bb_error_msg_and_die(msg_unsupported_err, "insertion");
76   }   }
77    
78   archive_handle->src_fd = xopen(argv[optind++], O_RDONLY);   archive_handle->src_fd = xopen(*argv++, O_RDONLY);
79    
80   while (optind < argc) {   while (*argv) {
81   archive_handle->filter = filter_accept_list;   archive_handle->filter = filter_accept_list;
82   llist_add_to(&(archive_handle->accept), argv[optind++]);   llist_add_to(&archive_handle->accept, *argv++);
83   }   }
84    
85   unpack_ar_archive(archive_handle);   unpack_ar_archive(archive_handle);

Legend:
Removed from v.983  
changed lines
  Added in v.984