From: Pali Rohár Date: Tue, 8 Dec 2020 23:34:23 +0000 (+0100) Subject: libblkid: iso9660: do not check is_str_empty() for iso->system_id and boot->boot_syst... X-Git-Tag: v2.37-rc1~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d027a2135af110bf9f4b4a165e34a2f8c0f6203;p=thirdparty%2Futil-linux.git libblkid: iso9660: do not check is_str_empty() for iso->system_id and boot->boot_system_id 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 --- diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c index 6e0073c7e5..9cfbc0dfec 100644 --- a/libblkid/src/superblocks/iso9660.c +++ b/libblkid/src/superblocks/iso9660.c @@ -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;