summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2017-05-11 10:59:14 +0200
committerKarel Zak2017-05-11 10:59:14 +0200
commitce59d8bfa596262aba128a220d33d9a14646f9d6 (patch)
treeb6cb4dc7600e129c10b050a743f67b9490f325ad
parenttests: update wipe-partition (diff)
parenttests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6 (diff)
downloadkernel-qcow2-util-linux-ce59d8bfa596262aba128a220d33d9a14646f9d6.tar.gz
kernel-qcow2-util-linux-ce59d8bfa596262aba128a220d33d9a14646f9d6.tar.xz
kernel-qcow2-util-linux-ce59d8bfa596262aba128a220d33d9a14646f9d6.zip
Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux: tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6 tests: Fix test output for low-probe-udf to contain UDF data Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
-rw-r--r--libblkid/docs/Makefile.am2
-rw-r--r--libblkid/src/Makemodule.am1
-rw-r--r--libblkid/src/superblocks/iso9660.c3
-rw-r--r--libblkid/src/superblocks/iso9660.h14
-rw-r--r--libblkid/src/superblocks/udf.c23
-rw-r--r--tests/expected/blkid/low-probe-udf7
-rw-r--r--tests/expected/blkid/low-probe-udf-cd-nero-69
-rw-r--r--tests/ts/blkid/images-fs/udf-cd-nero-6.img.xzbin0 -> 2168 bytes
8 files changed, 14 insertions, 45 deletions
diff --git a/libblkid/docs/Makefile.am b/libblkid/docs/Makefile.am
index dc6dd3e5e..83232c4a0 100644
--- a/libblkid/docs/Makefile.am
+++ b/libblkid/docs/Makefile.am
@@ -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
diff --git a/libblkid/src/Makemodule.am b/libblkid/src/Makemodule.am
index 1fa00e982..ed80222ec 100644
--- a/libblkid/src/Makemodule.am
+++ b/libblkid/src/Makemodule.am
@@ -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 \
diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c
index 4d56a3803..7356754ee 100644
--- a/libblkid/src/superblocks/iso9660.c
+++ b/libblkid/src/superblocks/iso9660.c
@@ -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
index a8d729df6..000000000
--- a/libblkid/src/superblocks/iso9660.h
+++ /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 */
diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c
index efbf7983d..36769779f 100644
--- a/libblkid/src/superblocks/udf.c
+++ b/libblkid/src/superblocks/udf.c
@@ -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,
diff --git a/tests/expected/blkid/low-probe-udf b/tests/expected/blkid/low-probe-udf
index b6fbef0ef..ad8d008a8 100644
--- a/tests/expected/blkid/low-probe-udf
+++ b/tests/expected/blkid/low-probe-udf
@@ -1,12 +1,9 @@
-ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM
ID_FS_LABEL=test-udf
ID_FS_LABEL_ENC=test-udf
ID_FS_LOGICAL_VOLUME_ID=test-udf
-ID_FS_SYSTEM_ID=LINUX
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
-ID_FS_UUID=2008-02-05-12-29-20-00
-ID_FS_UUID_ENC=2008-02-05-12-29-20-00
-ID_FS_VERSION=Joliet\x20Extension
+ID_FS_UUID=47A83A8000000000
+ID_FS_UUID_ENC=47A83A8000000000
ID_FS_VOLUME_ID=test-udf
ID_FS_VOLUME_SET_ID=47A83A8000000000
diff --git a/tests/expected/blkid/low-probe-udf-cd-nero-6 b/tests/expected/blkid/low-probe-udf-cd-nero-6
new file mode 100644
index 000000000..f76f31643
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-cd-nero-6
@@ -0,0 +1,9 @@
+ID_FS_LABEL=UDF_Label
+ID_FS_LABEL_ENC=UDF\x20Label
+ID_FS_LOGICAL_VOLUME_ID=UDF Label
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=4AA16678B55E9987
+ID_FS_UUID_ENC=4AA16678B55E9987
+ID_FS_VOLUME_ID=UDF Label
+ID_FS_VOLUME_SET_ID=4AA16678B55E9987
diff --git a/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz b/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz
new file mode 100644
index 000000000..673fa6245
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz
Binary files differ