Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (6 years ago)
Author:
bruno
Message:
  • Update mindi-busybox to 1.21.1
Location:
branches/3.2/mindi-busybox/e2fsprogs
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/e2fsprogs/Config.src

    r2725 r3232  
    3434    bool "lsattr"
    3535    default y
    36     depends on PLATFORM_LINUX
     36    select PLATFORM_LINUX
    3737    help
    3838      lsattr lists the file attributes on a second extended file system.
  • branches/3.2/mindi-busybox/e2fsprogs/chattr.c

    r2725 r3232  
    1919 * 98/12/29 - Display version info only when -V specified (G M Sipe)
    2020 */
     21
     22//usage:#define chattr_trivial_usage
     23//usage:       "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
     24//usage:#define chattr_full_usage "\n\n"
     25//usage:       "Change file attributes on an ext2 fs\n"
     26//usage:     "\nModifiers:"
     27//usage:     "\n    -   Remove attributes"
     28//usage:     "\n    +   Add attributes"
     29//usage:     "\n    =   Set attributes"
     30//usage:     "\nAttributes:"
     31//usage:     "\n    A   Don't track atime"
     32//usage:     "\n    a   Append mode only"
     33//usage:     "\n    c   Enable compress"
     34//usage:     "\n    D   Write dir contents synchronously"
     35//usage:     "\n    d   Don't backup with dump"
     36//usage:     "\n    i   Cannot be modified (immutable)"
     37//usage:     "\n    j   Write all data to journal first"
     38//usage:     "\n    s   Zero disk storage when deleted"
     39//usage:     "\n    S   Write file contents synchronously"
     40//usage:     "\n    t   Disable tail-merging of partial blocks with other files"
     41//usage:     "\n    u   Allow file to be undeleted"
     42//usage:     "\n    -R  Recurse"
     43//usage:     "\n    -v  Set the file's version/generation number"
    2144
    2245#include "libbb.h"
  • branches/3.2/mindi-busybox/e2fsprogs/e2fs_lib.h

    r2725 r3232  
    88
    99/* Constants and structures */
    10 #include "e2fs_defs.h"
     10#include "bb_e2fs_defs.h"
    1111
    1212PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
  • branches/3.2/mindi-busybox/e2fsprogs/fsck.c

    r2725 r3232  
    3434 * It doesn't guess filesystem types from on-disk format.
    3535 */
     36
     37//usage:#define fsck_trivial_usage
     38//usage:       "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
     39//usage:#define fsck_full_usage "\n\n"
     40//usage:       "Check and repair filesystems\n"
     41//usage:     "\n    -A  Walk /etc/fstab and check all filesystems"
     42//usage:     "\n    -N  Don't execute, just show what would be done"
     43//usage:     "\n    -P  With -A, check filesystems in parallel"
     44//usage:     "\n    -R  With -A, skip the root filesystem"
     45//usage:     "\n    -T  Don't show title on startup"
     46//usage:     "\n    -V  Verbose"
     47//usage:     "\n    -C n    Write status information to specified filedescriptor"
     48//usage:     "\n    -t TYPE List of filesystem types to check"
    3649
    3750#include "libbb.h"
     
    304317    FILE *fstab;
    305318    struct mntent mte;
    306     struct fs_info *fs;
    307319
    308320    fstab = setmntent(filename, "r");
     
    317329        //  mte.mnt_type, mte.mnt_opts,
    318330        //  mte.mnt_passno);
    319         fs = create_fs_device(mte.mnt_fsname, mte.mnt_dir,
     331        create_fs_device(mte.mnt_fsname, mte.mnt_dir,
    320332            mte.mnt_type, mte.mnt_opts,
    321333            mte.mnt_passno);
     
    467479    if (verbose > 1)
    468480        printf("Finished with %s (exit status %d)\n",
    469                inst->device, status);
     481            inst->device, status);
    470482    num_running--;
    471483    free_instance(inst);
     
    833845            printf("--waiting-- (pass %d)\n", passno);
    834846        status |= wait_many(pass_done ? FLAG_WAIT_ALL :
    835                     FLAG_WAIT_ATLEAST_ONE);
     847                FLAG_WAIT_ATLEAST_ONE);
    836848        if (pass_done) {
    837849            if (verbose > 1)
  • branches/3.2/mindi-busybox/e2fsprogs/lsattr.c

    r2725 r3232  
    1818 * 98/12/29 - Display version info only when -V specified (G M Sipe)
    1919 */
     20
     21//usage:#define lsattr_trivial_usage
     22//usage:       "[-Radlv] [FILE]..."
     23//usage:#define lsattr_full_usage "\n\n"
     24//usage:       "List file attributes on an ext2 fs\n"
     25//usage:     "\n    -R  Recurse"
     26//usage:     "\n    -a  Don't hide entries starting with ."
     27//usage:     "\n    -d  List directory entries instead of contents"
     28//usage:     "\n    -l  List long flag names"
     29//usage:     "\n    -v  List the file's version/generation number"
    2030
    2131#include "libbb.h"
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/blkid/blkid_getsize.c

    r1765 r3232  
    9797#ifdef BLKGETSIZE64
    9898#ifdef __linux__
    99     if ((uname(&ut) == 0) &&
    100         ((ut.release[0] == '2') && (ut.release[1] == '.') &&
    101          (ut.release[2] < '6') && (ut.release[3] == '.')))
     99    uname(&ut);
     100    if ((ut.release[0] == '2') && (ut.release[1] == '.') &&
     101         (ut.release[2] < '6') && (ut.release[3] == '.'))
    102102        valid_blkgetsize64 = 0;
    103103#endif
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/blkid/probe.c

    r2725 r3232  
    576576           dev->bid_name, diff));
    577577
    578     if (((fd = open(dev->bid_name, O_RDONLY)) < 0) ||
    579         (fstat(fd, &st) < 0)) {
     578    fd = open(dev->bid_name, O_RDONLY);
     579    if (fd < 0
     580     || fstat(fd, &st) < 0
     581    ) {
     582        if (fd >= 0)
     583            close(fd);
    580584        if (errno == ENXIO || errno == ENODEV || errno == ENOENT) {
    581585            blkid_free_dev(dev);
     
    654658    if (!dev->bid_type) {
    655659        blkid_free_dev(dev);
     660        close(fd);
    656661        return NULL;
    657662    }
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/e2fsck.c

    r2725 r3232  
    2929 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    3030 */
     31
     32/*
     33//usage:#define e2fsck_trivial_usage
     34//usage:       "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] "
     35//usage:       "[-I inode_buffer_blocks] [-P process_inode_size] "
     36//usage:       "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] "
     37//usage:       "[-E extended-options] device"
     38//usage:#define e2fsck_full_usage "\n\n"
     39//usage:       "Check ext2/ext3 file system\n"
     40//usage:     "\n    -p      Automatic repair (no questions)"
     41//usage:     "\n    -n      Make no changes to the filesystem"
     42//usage:     "\n    -y      Assume 'yes' to all questions"
     43//usage:     "\n    -c      Check for bad blocks and add them to the badblock list"
     44//usage:     "\n    -f      Force checking even if filesystem is marked clean"
     45//usage:     "\n    -v      Verbose"
     46//usage:     "\n    -b superblock   Use alternative superblock"
     47//usage:     "\n    -B blocksize    Force blocksize when looking for superblock"
     48//usage:     "\n    -j journal  Set location of the external journal"
     49//usage:     "\n    -l file     Add to badblocks list"
     50//usage:     "\n    -L file     Set badblocks list"
     51*/
    3152
    3253#include "e2fsck.h" /*Put all of our defines here to clean things up*/
     
    561582/*
    562583 * Return the given node's successor node---the node which has the
    563  * next key in the the left to right ordering. If the node has
     584 * next key in the left to right ordering. If the node has
    564585 * no successor, a null pointer is returned rather than a pointer to
    565586 * the nil node.
     
    1155711578     */
    1155811579    if (!(fs->super->s_feature_compat &
    11559           EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
     11580          EXT2_FEATURE_COMPAT_RESIZE_INO)) {
    1156011581        if (fs->super->s_reserved_gdt_blocks) {
    1156111582            pctx.num = fs->super->s_reserved_gdt_blocks;
     
    1157311594    if (retval) {
    1157411595        if (fs->super->s_feature_compat &
    11575             EXT2_FEATURE_COMPAT_RESIZE_INODE)
     11596            EXT2_FEATURE_COMPAT_RESIZE_INO)
    1157611597            ctx->flags |= E2F_FLAG_RESIZE_INODE;
    1157711598        return;
     
    1158311604     */
    1158411605    if (!(fs->super->s_feature_compat &
    11585           EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
     11606          EXT2_FEATURE_COMPAT_RESIZE_INO)) {
    1158611607        for (i=0; i < EXT2_N_BLOCKS; i++) {
    1158711608            if (inode.i_block[i])
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/e2fsck.h

    r2725 r3232  
    259259#define PR_1_SET_IMMUTABLE            0x010030  /* Immutable flag set on a device or socket inode */
    260260#define PR_1_COMPR_SET                0x010031  /* Compression flag set on a non-compressed filesystem */
    261 #define PR_1_SET_NONZSIZE             0x010032  /* Non-zero size on on device, fifo or socket inode */
     261#define PR_1_SET_NONZSIZE             0x010032  /* Non-zero size on device, fifo or socket inode */
    262262#define PR_1_FS_REV_LEVEL             0x010033  /* Filesystem revision is 0, but feature flags are set */
    263263#define PR_1_JOURNAL_INODE_NOT_CLEAR  0x010034  /* Journal inode not in use, needs clearing */
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/e2p/feature.c

    r1765 r3232  
    3535    {   E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_INDEX,
    3636            "dir_index" },
    37     {   E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INODE,
     37    {   E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INO,
    3838            "resize_inode" },
    3939    {   E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER,
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/ext2fs/ext2_fs.h

    r2725 r3232  
    476476#define EXT3_FEATURE_COMPAT_HAS_JOURNAL     0x0004
    477477#define EXT2_FEATURE_COMPAT_EXT_ATTR        0x0008
    478 #define EXT2_FEATURE_COMPAT_RESIZE_INODE    0x0010
     478#define EXT2_FEATURE_COMPAT_RESIZE_INO      0x0010
    479479#define EXT2_FEATURE_COMPAT_DIR_INDEX       0x0020
    480480
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/ext2fs/ext2fs.h

    r2725 r3232  
    384384                     EXT2_FEATURE_COMPAT_IMAGIC_INODES|\
    385385                     EXT3_FEATURE_COMPAT_HAS_JOURNAL|\
    386                      EXT2_FEATURE_COMPAT_RESIZE_INODE|\
     386                     EXT2_FEATURE_COMPAT_RESIZE_INO|\
    387387                     EXT2_FEATURE_COMPAT_DIR_INDEX|\
    388388                     EXT2_FEATURE_COMPAT_EXT_ATTR)
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/ext2fs/ext2fs_inline.c

    r2725 r3232  
    156156                    struct ext2_inode *inode)
    157157{
    158        return inode->i_blocks -
    159           (inode->i_file_acl ? fs->blocksize >> 9 : 0);
     158    return inode->i_blocks -
     159        (inode->i_file_acl ? fs->blocksize >> 9 : 0);
    160160}
    161161
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/ext2fs/get_pathname.c

    r2725 r3232  
    1616 *  directory inode, and <ino> is the inode number itself.  If
    1717 *  <ino> is zero, then ext2fs_get_pathname will return pathname
    18  *  of the the directory <dir>.
     18 *  of the directory <dir>.
    1919 *
    2020 */
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c

    r2725 r3232  
    175175#ifdef BLKGETSIZE64
    176176#ifdef __linux__
    177     if ((uname(&ut) == 0) &&
    178         ((ut.release[0] == '2') && (ut.release[1] == '.') &&
    179          (ut.release[2] < '6') && (ut.release[3] == '.')))
     177    uname(&ut);
     178    if ((ut.release[0] == '2') && (ut.release[1] == '.') &&
     179         (ut.release[2] < '6') && (ut.release[3] == '.'))
    180180        valid_blkgetsize64 = 0;
    181181#endif
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c

    r1765 r3232  
    285285     * check the number of reserved group descriptor table blocks
    286286     */
    287     if (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE)
     287    if (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INO)
    288288        rsv_gdt = calc_reserved_gdt_blocks(fs);
    289289    else
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/lsattr.c

    r2725 r3232  
    9494
    9595    if (lstat(path, &st) == -1)
    96         bb_perror_msg(path);
     96        bb_simple_perror_msg(path);
    9797    else {
    9898        if (de->d_name[0] != '.' || (flags & OPT_ALL)) {
  • branches/3.2/mindi-busybox/e2fsprogs/old_e2fsprogs/mke2fs.c

    r2725 r3232  
    758758            if (rsv_gdb > 0) {
    759759                sb_param->s_feature_compat |=
    760                     EXT2_FEATURE_COMPAT_RESIZE_INODE;
     760                    EXT2_FEATURE_COMPAT_RESIZE_INO;
    761761
    762762                sb_param->s_reserved_gdt_blocks = rsv_gdb;
     
    779779static __u32 ok_features[3] = {
    780780    EXT3_FEATURE_COMPAT_HAS_JOURNAL |
    781         EXT2_FEATURE_COMPAT_RESIZE_INODE |
     781        EXT2_FEATURE_COMPAT_RESIZE_INO |
    782782        EXT2_FEATURE_COMPAT_DIR_INDEX,  /* Compat */
    783783    EXT2_FEATURE_INCOMPAT_FILETYPE|         /* Incompat */
     
    11241124     * here if it was explicitly disabled.
    11251125     */
    1126     if ((param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
     1126    if ((param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INO) &&
    11271127        !(param.s_feature_ro_compat&EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
    11281128        bb_error_msg_and_die("reserved online resize blocks not supported "
     
    13131313        create_bad_block_inode(fs, bb_list);
    13141314        if (fs->super->s_feature_compat &
    1315             EXT2_FEATURE_COMPAT_RESIZE_INODE) {
     1315            EXT2_FEATURE_COMPAT_RESIZE_INO) {
    13161316            retval = ext2fs_create_resize_inode(fs);
    13171317            mke2fs_error_msg_and_die(retval, "reserve blocks for online resize");
  • 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.