libblkid-tiny: use blkid_probe_set_utf8label for label set
authorAnsuel Smith <ansuelsmth@gmail.com>
Sun, 16 Jun 2019 17:00:50 +0000 (19:00 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 3 Sep 2019 09:23:23 +0000 (11:23 +0200)
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
libblkid-tiny/f2fs.c
libblkid-tiny/hfs.c
libblkid-tiny/ntfs.c

index 6efce61cc9d069e4bdebe11a6a7897f25d3af627..2bf0f5e98028036dc69b40380e2cb613f21bd8ed 100644 (file)
@@ -71,12 +71,10 @@ static int probe_f2fs(blkid_probe pr, const struct blkid_idmag *mag)
        if (major == 1 && minor == 0)
                return 0;
 
-#if 0
        if (*((unsigned char *) sb->volume_name))
                blkid_probe_set_utf8label(pr, (unsigned char *) sb->volume_name,
                                                sizeof(sb->volume_name),
                                                BLKID_ENC_UTF16LE);
-#endif
 
        blkid_probe_set_uuid(pr, sb->uuid);
        blkid_probe_sprintf_version(pr, "%u.%u", major, minor);
index 8676d36ef6655860cc26438f4776147d6d563332..04f25a10ffa396af2048a5c2ec42b3219ad44c54 100644 (file)
@@ -294,11 +294,9 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag)
        if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID)
                return 0;
 
-#if 0
        blkid_probe_set_utf8label(pr, key->unicode,
                        be16_to_cpu(key->unicode_len) * 2,
                        BLKID_ENC_UTF16BE);
-#endif
 
        return 0;
 }
index 93c1d8812fa495dc3699c2907e879db390374ce6..3a9d5cb017639211381a3968d61bd8f2af029c44 100644 (file)
@@ -82,13 +82,11 @@ enum {
 static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
 {
        struct ntfs_super_block *ns;
-#if 0
        struct master_file_table_record *mft;
-#endif
 
        uint32_t sectors_per_cluster, mft_record_size;
        uint16_t sector_size;
-       uint64_t nr_clusters, off; //, attr_off;
+       uint64_t nr_clusters, off, attr_off;
        unsigned char *buf_mft;
 
        ns = blkid_probe_get_sb(pr, mag, struct ntfs_super_block);
@@ -174,7 +172,6 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
        if (memcmp(buf_mft, "FILE", 4))
                return 1;
 
-#if 0
        mft = (struct master_file_table_record *) buf_mft;
        attr_off = le16_to_cpu(mft->attrs_offset);
 
@@ -204,7 +201,6 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
 
                attr_off += attr_len;
        }
-#endif
 
        blkid_probe_sprintf_uuid(pr,
                        (unsigned char *) &ns->volume_serial,