]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
authorPali Rohár <pali.rohar@gmail.com>
Mon, 1 May 2017 09:19:02 +0000 (11:19 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Fri, 5 May 2017 16:38:15 +0000 (18:38 +0200)
This reverts commit 8053b51c7601c4a7e5f2eca45610b8228f53d408.

Reporting meaningless ID_FS_LABEL=UDF_Volume written in that commit was
caused by reading wrong value for UDF label and it was fixed in commit
2f2730bc77c972d613cfec421468c84f15749708.

So after this revert blkid reports for UDF filesystems label of UDF
filesystem and not label of ISO (if present) like other systems. In most
cases UDF and ISO labels are same (sometimes just one is upper case).

Commit 8053b51c7601c4a7e5f2eca45610b8228f53d408 just fixed result, not
reason why blkid reported different UDF Label as Windows. Real reason was
fixed in 2f2730bc77c972d613cfec421468c84f15749708.

libblkid/docs/Makefile.am
libblkid/src/Makemodule.am
libblkid/src/superblocks/iso9660.c
libblkid/src/superblocks/iso9660.h [deleted file]
libblkid/src/superblocks/udf.c

index dc6dd3e5ecb020c5c497a124f0151a47a776ea87..83232c4a069bc11d98e2e0dcf2db6eb2ddc3567c 100644 (file)
@@ -58,7 +58,7 @@ EXTRA_HFILES=
 # Header files to ignore when scanning. Use base file name, no paths
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
 IGNORE_HFILES=blkidP.h partitions.h superblocks.h \
-             topology.h aix.h dos.h iso9660.h
+             topology.h aix.h dos.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
index 1fa00e98296116c3ee5833e8a9d75914eec9c3e8..ed80222ec2f2eafd425736a8f0092d42ed59f193 100644 (file)
@@ -61,7 +61,6 @@ libblkid_la_SOURCES = \
        libblkid/src/superblocks/highpoint_raid.c \
        libblkid/src/superblocks/hpfs.c \
        libblkid/src/superblocks/iso9660.c \
-       libblkid/src/superblocks/iso9660.h \
        libblkid/src/superblocks/isw_raid.c \
        libblkid/src/superblocks/jfs.c \
        libblkid/src/superblocks/jmicron_raid.c \
index 4d56a3803dab1d0c981053ddab272d0c3335dc28..7356754eeb381a5c7d151568cdb88472ac655baa 100644 (file)
@@ -19,7 +19,6 @@
 #include <ctype.h>
 
 #include "superblocks.h"
-#include "iso9660.h"
 
 struct iso9660_date {
        unsigned char year[4];
@@ -167,7 +166,7 @@ static int is_str_empty(const unsigned char *str, size_t len)
 }
 
 /* iso9660 [+ Microsoft Joliet Extension] */
-int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag)
+static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag)
 {
        struct iso_volume_descriptor *iso;
        unsigned char label[32];
diff --git a/libblkid/src/superblocks/iso9660.h b/libblkid/src/superblocks/iso9660.h
deleted file mode 100644 (file)
index a8d729d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (C) 2013 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
- *
- * This file may be redistributed under the terms of the
- * GNU Lesser General Public License.
- */
-#ifndef _BLKID_ISO9660_H
-#define _BLKID_ISO9660_H
-
-#include "blkidP.h"
-
-extern int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag);
-
-#endif /* _BLKID_ISO9660_H */
index efbf7983dd529cdf63127486fbecb3d392edd673..36769779f520b2eb004a3027cf98162f6bf7a959 100644 (file)
@@ -17,7 +17,6 @@
 #include <stdint.h>
 
 #include "superblocks.h"
-#include "iso9660.h"
 
 struct dstring128 {
        uint8_t clen;
@@ -202,27 +201,7 @@ real_blksz:
        count = le32_to_cpu(vd->type.anchor.length) / bs;
        loc = le32_to_cpu(vd->type.anchor.location);
 
-       /* check if the list is usable */
-       for (b = 0; b < count; b++) {
-               vd = (struct volume_descriptor *)
-                       blkid_probe_get_buffer(pr,
-                                       (uint64_t) (loc + b) * bs,
-                                       sizeof(*vd));
-               if (!vd)
-                       return errno ? -errno : 1;
-       }
-
-       /* Try extract all possible ISO9660 information -- if there is
-        * usable LABEL and UUID in ISO header then use it, otherwise
-        * read UDF specific LABEL and UUID */
-       if (probe_iso9660(pr, mag) == 0) {
-               if (__blkid_probe_lookup_value(pr, "LABEL") != NULL)
-                       have_label = 1;
-               if (__blkid_probe_lookup_value(pr, "UUID") != NULL)
-                       have_uuid = 1;
-       }
-
-       /* Read UDF identifiers */
+       /* pick the primary descriptor from the list and read UDF identifiers */
        for (b = 0; b < count; b++) {
                vd = (struct volume_descriptor *)
                        blkid_probe_get_buffer(pr,