Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/e2fsprogs/old_e2fsprogs/tune2fs.c

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

revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC revision 816 by niro, Fri Apr 24 18:33:46 2009 UTC
# Line 44  Line 44 
44  #include "util.h"  #include "util.h"
45  #include "blkid/blkid.h"  #include "blkid/blkid.h"
46    
47  #include "busybox.h"  #include "libbb.h"
48    
49  static char * device_name = NULL;  static char * device_name = NULL;
50  static char * new_label, *new_last_mounted, *new_UUID;  static char * new_label, *new_last_mounted, *new_UUID;
# Line 340  static void add_journal(ext2_filsys fs) Line 340  static void add_journal(ext2_filsys fs)
340   fs->flags &= ~EXT2_FLAG_SUPER_ONLY;   fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
341   }   }
342   print_check_message(fs);   print_check_message(fs);
  return;  
343  }  }
344    
345  /*  /*
# Line 558  static void parse_tune2fs_options(int ar Line 557  static void parse_tune2fs_options(int ar
557   device_name = x_blkid_get_devname(argv[optind]);   device_name = x_blkid_get_devname(argv[optind]);
558  }  }
559    
 #ifdef CONFIG_FINDFS  
 static ATTRIBUTE_NORETURN void do_findfs(int argc, char **argv)  
 {  
  if ((argc != 2) ||  
     (strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5)))  
  bb_show_usage();  
  device_name = x_blkid_get_devname(argv[1]);  
  puts(device_name);  
  exit(0);  
 }  
 #else  
 #define do_findfs(x, y)  
 #endif  
   
560  static void tune2fs_clean_up(void)  static void tune2fs_clean_up(void)
561  {  {
562   if (ENABLE_FEATURE_CLEAN_UP && device_name) free(device_name);   if (ENABLE_FEATURE_CLEAN_UP && device_name) free(device_name);
563   if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device);   if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device);
564  }  }
565    
566    int tune2fs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
567  int tune2fs_main(int argc, char **argv)  int tune2fs_main(int argc, char **argv)
568  {  {
569   errcode_t retval;   errcode_t retval;
# Line 588  int tune2fs_main(int argc, char **argv) Line 574  int tune2fs_main(int argc, char **argv)
574   if (ENABLE_FEATURE_CLEAN_UP)   if (ENABLE_FEATURE_CLEAN_UP)
575   atexit(tune2fs_clean_up);   atexit(tune2fs_clean_up);
576    
577   if (ENABLE_FINDFS && (applet_name[0] == 'f')) /* findfs */   if (ENABLE_E2LABEL && (applet_name[0] == 'e')) /* e2label */
  do_findfs(argc, argv);  /* no return */  
  else if (ENABLE_E2LABEL && (applet_name[0] == 'e')) /* e2label */  
578   parse_e2label_options(argc, argv);   parse_e2label_options(argc, argv);
579   else   else
580   parse_tune2fs_options(argc, argv);  /* tune2fs */   parse_tune2fs_options(argc, argv);  /* tune2fs */

Legend:
Removed from v.532  
changed lines
  Added in v.816