Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/e2fsprogs/tune2fs.c

    r2725 r3232  
    99#include "libbb.h"
    1010#include <linux/fs.h>
    11 #include <linux/ext2_fs.h>
     11#include "bb_e2fs_defs.h"
    1212
    1313// storage helpers
     
    2929
    3030//usage:#define tune2fs_trivial_usage
    31 //usage:       "[-c MOUNT_CNT] "
     31//usage:       "[-c MAX_MOUNT_COUNT] "
    3232////usage:     "[-e errors-behavior] [-g group] "
    3333//usage:       "[-i DAYS] "
    3434////usage:     "[-j] [-J journal-options] [-l] [-s sparse-flag] "
    3535////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] "
    3738//usage:       "[-L LABEL] "
    3839////usage:     "[-M last-mounted-dir] [-O [^]feature[,...]] "
     
    4748    OPT_c = 1 << 1, // max mount count
    4849    OPT_i = 1 << 2, // check interval
     50    OPT_C = 1 << 3, // current mount count
    4951};
    5052
     
    5355{
    5456    unsigned opts;
    55     const char *label, *str_c, *str_i;
     57    const char *label, *str_c, *str_i, *str_C;
    5658    struct ext2_super_block *sb;
    5759    int fd;
    5860
    5961    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);
    6163    if (!opts)
    6264        bb_show_usage();
     
    7173    // mangle superblock
    7274    //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    }
    7380
    7481    // set the label
Note: See TracChangeset for help on using the changeset viewer.