Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/e2fsprogs/tune2fs.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/e2fsprogs/tune2fs.c
r2725 r3232 9 9 #include "libbb.h" 10 10 #include <linux/fs.h> 11 #include <linux/ext2_fs.h>11 #include "bb_e2fs_defs.h" 12 12 13 13 // storage helpers … … 29 29 30 30 //usage:#define tune2fs_trivial_usage 31 //usage: "[-c M OUNT_CNT] "31 //usage: "[-c MAX_MOUNT_COUNT] " 32 32 ////usage: "[-e errors-behavior] [-g group] " 33 33 //usage: "[-i DAYS] " 34 34 ////usage: "[-j] [-J journal-options] [-l] [-s sparse-flag] " 35 35 ////usage: "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " 36 ////usage: "[-r reserved-blocks-count] [-u user] [-C mount-count] " 36 ////usage: "[-r reserved-blocks-count] [-u user] " 37 //usage: "[-C MOUNT_COUNT] " 37 38 //usage: "[-L LABEL] " 38 39 ////usage: "[-M last-mounted-dir] [-O [^]feature[,...]] " … … 47 48 OPT_c = 1 << 1, // max mount count 48 49 OPT_i = 1 << 2, // check interval 50 OPT_C = 1 << 3, // current mount count 49 51 }; 50 52 … … 53 55 { 54 56 unsigned opts; 55 const char *label, *str_c, *str_i ;57 const char *label, *str_c, *str_i, *str_C; 56 58 struct ext2_super_block *sb; 57 59 int fd; 58 60 59 61 opt_complementary = "=1"; 60 opts = getopt32(argv, "L:c:i: ", &label, &str_c, &str_i);62 opts = getopt32(argv, "L:c:i:C:", &label, &str_c, &str_i, &str_C); 61 63 if (!opts) 62 64 bb_show_usage(); … … 71 73 // mangle superblock 72 74 //STORE_LE(sb->s_wtime, time(NULL)); - why bother? 75 76 if (opts & OPT_C) { 77 int n = xatoi_range(str_C, 1, 0xfffe); 78 STORE_LE(sb->s_mnt_count, (unsigned)n); 79 } 73 80 74 81 // set the label
Note:
See TracChangeset
for help on using the changeset viewer.