Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
Location:
branches/3.2/mindi-busybox/util-linux/volume_id
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/util-linux/volume_id/Kbuild.src

    r2725 r3232  
    3232### lib-$(CONFIG_FEATURE_VOLUMEID_MAC)              += mac.o
    3333### lib-$(CONFIG_FEATURE_VOLUMEID_MSDOS)            += msdos.o
     34lib-$(CONFIG_FEATURE_VOLUMEID_NILFS)            += nilfs.o
    3435lib-$(CONFIG_FEATURE_VOLUMEID_NTFS)             += ntfs.o
     36lib-$(CONFIG_FEATURE_VOLUMEID_EXFAT)            += exfat.o
    3537lib-$(CONFIG_FEATURE_VOLUMEID_REISERFS)         += reiserfs.o
    3638lib-$(CONFIG_FEATURE_VOLUMEID_UDF)              += udf.o
  • branches/3.2/mindi-busybox/util-linux/volume_id/btrfs.c

    r2725 r3232  
    103103    volume_id_set_label_string(id, sb->label, VOLUME_ID_LABEL_SIZE);
    104104    volume_id_set_uuid(id, sb->fsid, UUID_DCE);
     105    IF_FEATURE_BLKID_TYPE(id->type = "btrfs";)
    105106
    106107    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/cramfs.c

    r2725 r3232  
    5252
    5353//      volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    54 //      id->type = "cramfs";
     54        IF_FEATURE_BLKID_TYPE(id->type = "cramfs";)
    5555        return 0;
    5656    }
  • branches/3.2/mindi-busybox/util-linux/volume_id/ext.c

    r2725 r3232  
    2020
    2121#include "volume_id_internal.h"
     22#include "bb_e2fs_defs.h"
    2223
    23 struct ext2_super_block {
    24     uint32_t    inodes_count;
    25     uint32_t    blocks_count;
    26     uint32_t    r_blocks_count;
    27     uint32_t    free_blocks_count;
    28     uint32_t    free_inodes_count;
    29     uint32_t    first_data_block;
    30     uint32_t    log_block_size;
    31     uint32_t    dummy3[7];
    32     uint8_t magic[2];
    33     uint16_t    state;
    34     uint32_t    dummy5[8];
    35     uint32_t    feature_compat;
    36     uint32_t    feature_incompat;
    37     uint32_t    feature_ro_compat;
    38     uint8_t uuid[16];
    39     uint8_t volume_name[16];
    40 } PACKED;
    41 
    42 #define EXT3_FEATURE_COMPAT_HAS_JOURNAL     0x00000004
    43 #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV   0x00000008
    4424#define EXT_SUPERBLOCK_OFFSET           0x400
    4525
     
    5535        return -1;
    5636
    57     if (es->magic[0] != 0123 || es->magic[1] != 0357) {
     37    if (es->s_magic != cpu_to_le16(EXT2_SUPER_MAGIC)) {
    5838        dbg("ext: no magic found");
    5939        return -1;
     
    6242//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    6343//  volume_id_set_label_raw(id, es->volume_name, 16);
    64     volume_id_set_label_string(id, es->volume_name, 16);
    65     volume_id_set_uuid(id, es->uuid, UUID_DCE);
     44    volume_id_set_label_string(id, (void*)es->s_volume_name, 16);
     45    volume_id_set_uuid(id, es->s_uuid, UUID_DCE);
    6646    dbg("ext: label '%s' uuid '%s'", id->label, id->uuid);
    6747
    68 //  if ((le32_to_cpu(es->feature_compat) & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0)
    69 //      id->type = "ext3";
    70 //  else
    71 //      id->type = "ext2";
    72 
     48#if ENABLE_FEATURE_BLKID_TYPE
     49    if ((es->s_feature_ro_compat & cpu_to_le32(EXT4_FEATURE_RO_COMPAT_HUGE_FILE | EXT4_FEATURE_RO_COMPAT_DIR_NLINK))
     50     || (es->s_feature_incompat & cpu_to_le32(EXT4_FEATURE_INCOMPAT_EXTENTS | EXT4_FEATURE_INCOMPAT_64BIT))
     51    ) {
     52        id->type = "ext4";
     53    }
     54    else if (es->s_feature_compat & cpu_to_le32(EXT3_FEATURE_COMPAT_HAS_JOURNAL))
     55        id->type = "ext3";
     56    else
     57        id->type = "ext2";
     58#endif
    7359    return 0;
    7460}
  • branches/3.2/mindi-busybox/util-linux/volume_id/fat.c

    r2725 r3232  
    333333 ret:
    334334//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    335 //  id->type = "vfat";
     335    IF_FEATURE_BLKID_TYPE(id->type = "vfat";)
    336336
    337337    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/get_devname.c

    r2725 r3232  
    2020    char *label;
    2121    char *uc_uuid; /* prefix makes it easier to grep for */
     22    IF_FEATURE_BLKID_TYPE(const char *type;)
    2223} *uuidCache;
     24
     25#if !ENABLE_FEATURE_BLKID_TYPE
     26#define get_label_uuid(fd, label, uuid, type) \
     27    get_label_uuid(fd, label, uuid)
     28#define uuidcache_addentry(device, label, uuid, type) \
     29    uuidcache_addentry(device, label, uuid)
     30#endif
    2331
    2432/* Returns !0 on error.
     
    2735 * NB: closes fd. */
    2836static int
    29 get_label_uuid(int fd, char **label, char **uuid)
     37get_label_uuid(int fd, char **label, char **uuid, const char **type)
    3038{
    3139    int rv = 1;
     
    4250        goto ret;
    4351
    44     if (vid->label[0] != '\0' || vid->uuid[0] != '\0') {
     52    if (vid->label[0] != '\0' || vid->uuid[0] != '\0'
     53#if ENABLE_FEATURE_BLKID_TYPE
     54     || vid->type != NULL
     55#endif
     56    ) {
    4557        *label = xstrndup(vid->label, sizeof(vid->label));
    4658        *uuid  = xstrndup(vid->uuid, sizeof(vid->uuid));
     59#if ENABLE_FEATURE_BLKID_TYPE
     60        *type = vid->type;
     61        dbg("found label '%s', uuid '%s', type '%s'", *label, *uuid, *type);
     62#else
    4763        dbg("found label '%s', uuid '%s'", *label, *uuid);
     64#endif
    4865        rv = 0;
    4966    }
     
    5572/* NB: we take ownership of (malloc'ed) label and uuid */
    5673static void
    57 uuidcache_addentry(char *device, /*int major, int minor,*/ char *label, char *uuid)
     74uuidcache_addentry(char *device, /*int major, int minor,*/ char *label, char *uuid, const char *type)
    5875{
    5976    struct uuidCache_s *last;
     
    7390    last->label = label;
    7491    last->uc_uuid = uuid;
     92    IF_FEATURE_BLKID_TYPE(last->type = type;)
    7593}
    7694
     
    84102        int depth UNUSED_PARAM)
    85103{
    86     char *uuid = uuid; /* for compiler */
    87     char *label = label;
    88     int fd;
    89 
    90104    /* note: this check rejects links to devices, among other nodes */
    91105    if (!S_ISBLK(statbuf->st_mode))
     
    100114        return TRUE;
    101115
    102     fd = open(device, O_RDONLY);
    103     if (fd < 0)
    104         return TRUE;
    105 
    106     /* get_label_uuid() closes fd in all cases (success & failure) */
    107     if (get_label_uuid(fd, &label, &uuid) == 0) {
    108         /* uuidcache_addentry() takes ownership of all three params */
    109         uuidcache_addentry(xstrdup(device), /*ma, mi,*/ label, uuid);
    110     }
     116    add_to_uuid_cache(device);
     117
    111118    return TRUE;
    112119}
    113120
    114 static void
    115 uuidcache_init(void)
    116 {
     121static struct uuidCache_s*
     122uuidcache_init(int scan_devices)
     123{
     124    dbg("DBG: uuidCache=%x, uuidCache");
    117125    if (uuidCache)
    118         return;
     126        return uuidCache;
    119127
    120128    /* We were scanning /proc/partitions
     
    128136     * (Maybe add scanning of /sys/block/XXX/dev for devices
    129137     * somehow not having their /dev/XXX entries created?) */
    130 
    131     recursive_action("/dev", ACTION_RECURSE,
    132         uuidcache_check_device, /* file_action */
    133         NULL, /* dir_action */
    134         NULL, /* userData */
    135         0 /* depth */);
     138    if (scan_devices)
     139        recursive_action("/dev", ACTION_RECURSE,
     140            uuidcache_check_device, /* file_action */
     141            NULL, /* dir_action */
     142            NULL, /* userData */
     143            0 /* depth */);
     144
     145    return uuidCache;
    136146}
    137147
     
    145155    struct uuidCache_s *uc;
    146156
    147     uuidcache_init();
    148     uc = uuidCache;
    149 
     157    uc = uuidcache_init(/*scan_devices:*/ 1);
    150158    while (uc) {
    151159        switch (n) {
     
    212220
    213221/* Used by blkid */
    214 void display_uuid_cache(void)
    215 {
    216     struct uuidCache_s *u;
    217 
    218     uuidcache_init();
    219     u = uuidCache;
    220     while (u) {
    221         printf("%s:", u->device);
    222         if (u->label[0])
    223             printf(" LABEL=\"%s\"", u->label);
    224         if (u->uc_uuid[0])
    225             printf(" UUID=\"%s\"", u->uc_uuid);
     222void display_uuid_cache(int scan_devices)
     223{
     224    struct uuidCache_s *uc;
     225
     226    uc = uuidcache_init(scan_devices);
     227    while (uc) {
     228        printf("%s:", uc->device);
     229        if (uc->label[0])
     230            printf(" LABEL=\"%s\"", uc->label);
     231        if (uc->uc_uuid[0])
     232            printf(" UUID=\"%s\"", uc->uc_uuid);
     233#if ENABLE_FEATURE_BLKID_TYPE
     234    if (uc->type)
     235        printf(" TYPE=\"%s\"", uc->type);
     236#endif
    226237        bb_putchar('\n');
    227         u = u->next;
    228     }
    229 }
     238        uc = uc->next;
     239    }
     240}
     241
     242int add_to_uuid_cache(const char *device)
     243{
     244    char *uuid = uuid; /* for compiler */
     245    char *label = label;
     246#if ENABLE_FEATURE_BLKID_TYPE
     247    const char *type = type;
     248#endif
     249    int fd;
     250
     251    fd = open(device, O_RDONLY);
     252    if (fd < 0)
     253        return 0;
     254
     255    /* get_label_uuid() closes fd in all cases (success & failure) */
     256    if (get_label_uuid(fd, &label, &uuid, &type) == 0) {
     257        /* uuidcache_addentry() takes ownership of all four params */
     258        uuidcache_addentry(xstrdup(device), /*ma, mi,*/ label, uuid, type);
     259        return 1;
     260    }
     261    return 0;
     262}
     263
    230264
    231265/* Used by mount and findfs */
     
    235269    struct uuidCache_s *uc;
    236270
    237     uuidcache_init();
    238     uc = uuidCache;
     271    uc = uuidcache_init(/*scan_devices:*/ 1);
    239272    while (uc) {
    240273        if (uc->label[0] && strcmp(spec, uc->label) == 0) {
     
    250283    struct uuidCache_s *uc;
    251284
    252     uuidcache_init();
    253     uc = uuidCache;
     285    uc = uuidcache_init(/*scan_devices:*/ 1);
    254286    while (uc) {
    255287        /* case of hex numbers doesn't matter */
  • branches/3.2/mindi-busybox/util-linux/volume_id/hfs.c

    r2725 r3232  
    132132#define HFSPLUS_POR_CNID        1
    133133
     134static void FAST_FUNC hfs_set_uuid(struct volume_id *id, const uint8_t *hfs_id)
     135{
     136#define hfs_id_len 8
     137    md5_ctx_t md5c;
     138    uint8_t uuid[16];
     139    unsigned i;
     140
     141    for (i = 0; i < hfs_id_len; i++)
     142        if (hfs_id[i] != 0)
     143            goto do_md5;
     144    return;
     145 do_md5:
     146    md5_begin(&md5c);
     147    md5_hash(&md5c, "\263\342\17\71\362\222\21\326\227\244\0\60\145\103\354\254", 16);
     148    md5_hash(&md5c, hfs_id, hfs_id_len);
     149    md5_end(&md5c, uuid);
     150    uuid[6] = 0x30 | (uuid[6] & 0x0f);
     151    uuid[8] = 0x80 | (uuid[8] & 0x3f);
     152    volume_id_set_uuid(id, uuid, UUID_DCE);
     153}
     154
    134155int FAST_FUNC volume_id_probe_hfs_hfsplus(struct volume_id *id /*,uint64_t off*/)
    135156{
     
    194215    }
    195216
    196     volume_id_set_uuid(id, hfs->finder_info.id, UUID_HFS);
     217    hfs_set_uuid(id, hfs->finder_info.id);
    197218//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    198 //  id->type = "hfs";
     219    IF_FEATURE_BLKID_TYPE(id->type = "hfs";)
    199220
    200221    return 0;
     
    208229
    209230 hfsplus:
    210     volume_id_set_uuid(id, hfsplus->finder_info.id, UUID_HFS);
     231    hfs_set_uuid(id, hfsplus->finder_info.id);
    211232
    212233    blocksize = be32_to_cpu(hfsplus->blocksize);
     
    287308 found:
    288309//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    289 //  id->type = "hfsplus";
     310    IF_FEATURE_BLKID_TYPE(id->type = "hfsplus";)
    290311
    291312    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/iso9660.c

    r2725 r3232  
    115115 found:
    116116//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    117 //  id->type = "iso9660";
     117    IF_FEATURE_BLKID_TYPE(id->type = "iso9660";)
    118118
    119119    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/jfs.c

    r2725 r3232  
    5555
    5656//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    57 //  id->type = "jfs";
     57    IF_FEATURE_BLKID_TYPE(id->type = "jfs";)
    5858
    5959    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/linux_raid.c

    r2725 r3232  
    7070
    7171//  snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u",
    72 //       le32_to_cpu(mdp->major_version),
    73 //       le32_to_cpu(mdp->minor_version),
    74 //       le32_to_cpu(mdp->patch_version));
     72//      le32_to_cpu(mdp->major_version),
     73//      le32_to_cpu(mdp->minor_version),
     74//      le32_to_cpu(mdp->patch_version));
    7575
    7676    dbg("found raid signature");
    7777//  volume_id_set_usage(id, VOLUME_ID_RAID);
    78 //  id->type = "linux_raid_member";
     78    IF_FEATURE_BLKID_TYPE(id->type = "linux_raid_member";)
    7979
    8080    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/linux_swap.c

    r2725 r3232  
    7373found:
    7474//  volume_id_set_usage(id, VOLUME_ID_OTHER);
    75 //  id->type = "swap";
     75    IF_FEATURE_BLKID_TYPE(id->type = "swap";)
    7676
    7777    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/luks.c

    r2725 r3232  
    9595//  volume_id_set_usage(id, VOLUME_ID_CRYPTO);
    9696    volume_id_set_uuid(id, header->uuid, UUID_DCE_STRING);
    97 //  id->type = "crypto_LUKS";
     97    IF_FEATURE_BLKID_TYPE(id->type = "crypto_LUKS";)
    9898
    9999    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/ntfs.c

    r2725 r3232  
    133133
    134134    buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size),
    135              mft_record_size);
     135            mft_record_size);
    136136    if (buf == NULL)
    137137        goto found;
     
    151151        attr = (struct file_attribute*) &buf[attr_off];
    152152        attr_type = le32_to_cpu(attr->type);
    153         attr_len = le16_to_cpu(attr->len);
     153        attr_len = le32_to_cpu(attr->len);
    154154        val_off = le16_to_cpu(attr->value_offset);
    155155        val_len = le32_to_cpu(attr->value_len);
     
    166166
    167167        dbg("found attribute type 0x%x, len %i, at offset %i",
    168             attr_type, attr_len, attr_off);
     168            attr_type, attr_len, attr_off);
    169169
    170170//      if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) {
     
    189189 found:
    190190//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    191 //  id->type = "ntfs";
     191    IF_FEATURE_BLKID_TYPE(id->type = "ntfs";)
    192192
    193193    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/ocfs2.c

    r2725 r3232  
    102102                    OCFS2_MAX_VOL_LABEL_LEN : VOLUME_ID_LABEL_SIZE);
    103103    volume_id_set_uuid(id, os->s_uuid, UUID_DCE);
    104 //  id->type = "ocfs2";
     104    IF_FEATURE_BLKID_TYPE(id->type = "ocfs2";)
    105105    return 0;
    106106}
  • branches/3.2/mindi-busybox/util-linux/volume_id/reiserfs.c

    r2725 r3232  
    108108 found:
    109109//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    110 //  id->type = "reiserfs";
     110    IF_FEATURE_BLKID_TYPE(id->type = "reiserfs";)
    111111
    112112    return 0;
  • branches/3.2/mindi-busybox/util-linux/volume_id/romfs.c

    r2725 r3232  
    4848
    4949//      volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    50 //      id->type = "romfs";
     50        IF_FEATURE_BLKID_TYPE(id->type = "romfs";)
    5151        return 0;
    5252    }
  • branches/3.2/mindi-busybox/util-linux/volume_id/sysv.c

    r2725 r3232  
    100100//          volume_id_set_label_raw(id, vs->s_fname, 6);
    101101            volume_id_set_label_string(id, vs->s_fname, 6);
    102 //          id->type = "sysv";
     102            IF_FEATURE_BLKID_TYPE(id->type = "sysv");
    103103            goto found;
    104104        }
     
    113113//          volume_id_set_label_raw(id, xs->s_fname, 6);
    114114            volume_id_set_label_string(id, xs->s_fname, 6);
    115 //          id->type = "xenix";
     115            IF_FEATURE_BLKID_TYPE(id->type = "xenix";)
    116116            goto found;
    117117        }
  • branches/3.2/mindi-busybox/util-linux/volume_id/udf.c

    r2725 r3232  
    110110
    111111        dbg("vsd: %c%c%c%c%c",
    112             vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]);
     112            vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]);
    113113
    114114        if (vsd->id[0] == '\0')
     
    168168 found:
    169169//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    170 //  id->type = "udf";
    171 
     170    IF_FEATURE_BLKID_TYPE(id->type = "udf";)
    172171    return 0;
    173172}
  • branches/3.2/mindi-busybox/util-linux/volume_id/unused_msdos.c

    r2725 r3232  
    110110        } else {
    111111            dbg("found 0x%x data partition at 0x%llx, len 0x%llx",
    112                 part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen);
     112                part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen);
    113113
    114114//          if (is_raid(part[i].sys_ind))
  • branches/3.2/mindi-busybox/util-linux/volume_id/unused_silicon_raid.c

    r2725 r3232  
    6363//  volume_id_set_usage(id, VOLUME_ID_RAID);
    6464//  snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u",
    65 //       le16_to_cpu(sil->major_ver), le16_to_cpu(sil->minor_ver));
     65//      le16_to_cpu(sil->major_ver), le16_to_cpu(sil->minor_ver));
    6666//  id->type = "silicon_medley_raid_member";
    6767
  • branches/3.2/mindi-busybox/util-linux/volume_id/util.c

    r2725 r3232  
    3232        else
    3333            c = (buf[i] << 8) | buf[i+1];
    34         if (c == 0) {
    35             str[j] = '\0';
     34        if (c == 0)
    3635            break;
    37         } else if (c < 0x80) {
    38             if (j+1 >= len)
    39                 break;
    40             str[j++] = (uint8_t) c;
    41         } else if (c < 0x800) {
     36        if (j+1 >= len)
     37            break;
     38        if (c < 0x80) {
     39            /* 0xxxxxxx */
     40        } else {
     41            uint8_t topbits = 0xc0;
    4242            if (j+2 >= len)
    4343                break;
    44             str[j++] = (uint8_t) (0xc0 | (c >> 6));
    45             str[j++] = (uint8_t) (0x80 | (c & 0x3f));
    46         } else {
    47             if (j+3 >= len)
    48                 break;
    49             str[j++] = (uint8_t) (0xe0 | (c >> 12));
    50             str[j++] = (uint8_t) (0x80 | ((c >> 6) & 0x3f));
    51             str[j++] = (uint8_t) (0x80 | (c & 0x3f));
     44            if (c < 0x800) {
     45                /* 110yyyxx 10xxxxxx */
     46            } else {
     47                if (j+3 >= len)
     48                    break;
     49                /* 1110yyyy 10yyyyxx 10xxxxxx */
     50                str[j++] = (uint8_t) (0xe0 | (c >> 12));
     51                topbits = 0x80;
     52            }
     53            str[j++] = (uint8_t) (topbits | ((c >> 6) & 0x3f));
     54            c = 0x80 | (c & 0x3f);
    5255        }
     56        str[j++] = (uint8_t) c;
    5357    }
    5458    str[j] = '\0';
     
    126130void volume_id_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count)
    127131{
    128      volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count);
     132    volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count);
    129133}
    130134
     
    132136{
    133137    unsigned i;
    134     unsigned count = 0;
    135 
    136     switch (format) {
    137     case UUID_DOS:
    138         count = 4;
    139         break;
    140     case UUID_NTFS:
    141     case UUID_HFS:
    142         count = 8;
    143         break;
    144     case UUID_DCE:
    145         count = 16;
    146         break;
    147     case UUID_DCE_STRING:
    148         /* 36 is ok, id->uuid has one extra byte for NUL */
    149         count = VOLUME_ID_UUID_SIZE;
    150         break;
    151     }
     138    unsigned count = (format == UUID_DCE_STRING ? VOLUME_ID_UUID_SIZE : 4 << format);
     139
    152140//  memcpy(id->uuid_raw, buf, count);
    153141//  id->uuid_raw_len = count;
     
    169157            buf[7], buf[6], buf[5], buf[4],
    170158            buf[3], buf[2], buf[1], buf[0]);
    171         break;
    172     case UUID_HFS:
    173         sprintf(id->uuid, "%02X%02X%02X%02X%02X%02X%02X%02X",
    174             buf[0], buf[1], buf[2], buf[3],
    175             buf[4], buf[5], buf[6], buf[7]);
    176159        break;
    177160    case UUID_DCE:
  • branches/3.2/mindi-busybox/util-linux/volume_id/volume_id.c

    r2725 r3232  
    9494    volume_id_probe_vfat,
    9595#endif
     96#if ENABLE_FEATURE_VOLUMEID_EXFAT
     97    volume_id_probe_exfat,
     98#endif
    9699#if ENABLE_FEATURE_VOLUMEID_MAC
    97100    volume_id_probe_mac_partition_map,
     101#endif
     102#if ENABLE_FEATURE_VOLUMEID_SQUASHFS
     103    volume_id_probe_squashfs,
    98104#endif
    99105#if ENABLE_FEATURE_VOLUMEID_XFS
     
    130136#if ENABLE_FEATURE_VOLUMEID_UFS
    131137    volume_id_probe_ufs,
     138#endif
     139#if ENABLE_FEATURE_VOLUMEID_NILFS
     140    volume_id_probe_nilfs,
    132141#endif
    133142#if ENABLE_FEATURE_VOLUMEID_NTFS
  • branches/3.2/mindi-busybox/util-linux/volume_id/volume_id_internal.h

    r2725 r3232  
    8181//  smallint    usage_id;
    8282//  const char  *usage;
    83 //  const char  *type;
     83#if ENABLE_FEATURE_BLKID_TYPE
     84    const char  *type;
     85#endif
    8486};
    8587
     
    135137#endif
    136138
     139/* volume_id_set_uuid(id,buf,fmt) assumes size of uuid buf
     140 * by shifting: 4 << fmt, except for fmt == UUID_DCE_STRING.
     141 * The constants below should match sizes.
     142 */
    137143enum uuid_format {
    138     UUID_DCE_STRING,
    139     UUID_DCE,
    140     UUID_DOS,
    141     UUID_NTFS,
    142     UUID_HFS,
     144    UUID_DOS = 0,       /* 4 bytes */
     145    UUID_NTFS = 1,      /* 8 bytes */
     146    UUID_DCE = 2,       /* 16 bytes */
     147    UUID_DCE_STRING = 3,    /* 36 bytes (VOLUME_ID_UUID_SIZE) */
    143148};
    144149
     
    211216//int FAST_FUNC volume_id_probe_msdos_part_table(struct volume_id *id /*,uint64_t off*/);
    212217
     218int FAST_FUNC volume_id_probe_nilfs(struct volume_id *id /*,uint64_t off*/);
     219
    213220int FAST_FUNC volume_id_probe_ntfs(struct volume_id *id /*,uint64_t off*/);
    214221
     222int FAST_FUNC volume_id_probe_exfat(struct volume_id *id /*,uint64_t off*/);
     223
    215224int FAST_FUNC volume_id_probe_ocfs2(struct volume_id *id /*,uint64_t off*/);
    216225
     
    219228int FAST_FUNC volume_id_probe_romfs(struct volume_id *id /*,uint64_t off*/);
    220229
     230int FAST_FUNC volume_id_probe_squashfs(struct volume_id *id /*,uint64_t off*/);
     231
    221232int FAST_FUNC volume_id_probe_sysv(struct volume_id *id /*,uint64_t off*/);
    222233
  • branches/3.2/mindi-busybox/util-linux/volume_id/xfs.c

    r2725 r3232  
    5555
    5656//  volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
    57 //  id->type = "xfs";
     57    IF_FEATURE_BLKID_TYPE(id->type = "xfs";)
    5858
    5959    return 0;
Note: See TracChangeset for help on using the changeset viewer.