]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: iso9660: do not check is_str_empty() for iso->system_id and boot->boot_syst...
authorPali Rohár <pali.rohar@gmail.com>
Tue, 8 Dec 2020 23:34:23 +0000 (00:34 +0100)
committerPali Rohár <pali.rohar@gmail.com>
Tue, 8 Dec 2020 23:34:23 +0000 (00:34 +0100)
ECMA 119 (ISO 9660) does not say anything if all bytes are of these fields
are FILLER then fields are not set. It says it for iso->publisher_id and
iso->application_id.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
libblkid/src/superblocks/iso9660.c

index 6e0073c7e5a07570035eb7c87ae4b023c50afaad..9cfbc0dfecb8d53d72841bbfd6cfb6aa6ca9fad3 100644 (file)
@@ -190,8 +190,7 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag)
 
        blkid_probe_set_block_size(pr, 2048);
 
-       if (!is_str_empty(iso->system_id, sizeof(iso->system_id)))
-               blkid_probe_set_id_label(pr, "SYSTEM_ID",
+       blkid_probe_set_id_label(pr, "SYSTEM_ID",
                                iso->system_id, sizeof(iso->system_id));
 
        if (!is_str_empty(iso->publisher_id, sizeof(iso->publisher_id)))
@@ -219,9 +218,7 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag)
                        break;
 
                if (boot->vd_type == ISO_VD_BOOT_RECORD) {
-                       if (!is_str_empty(boot->boot_system_id,
-                                         sizeof(boot->boot_system_id)))
-                               blkid_probe_set_id_label(pr, "BOOT_SYSTEM_ID",
+                       blkid_probe_set_id_label(pr, "BOOT_SYSTEM_ID",
                                                        boot->boot_system_id,
                                                        sizeof(boot->boot_system_id));
                        off += ISO_SECTOR_SIZE;