[libosinfo PATCH 1/6] media: Ignore case when detecting bootable ppc ISO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When detecting a PPC bootable iso, we should search by the
"/ppc/bootinfo.txt" file inside the iso. However, there's no guarantee
that the name of the file will be always lowercased as it depends on the
extensions used to generate the ISO.

The problematic ISO can be found at:
http://cdimage.debian.org/cdimage/release/9.9.0/ppc64el/iso-cd/debian-9.9.0-ppc64el-netinst.iso

And one curious thing to mention is that there's no TRANS.TBL file (the
one used to translate, for instance, PPC -> ppc) present in the ISO.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 osinfo/osinfo_media.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index 34968ec..de75988 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -913,7 +913,7 @@ static void on_directory_record_extent_read(GObject *source,
 
         check = check_directory_record_entry_flags(dr->flags, is_dir);
         if (check &&
-            strncmp(data->filepath[data->filepath_index], dr->filename, strlen(data->filepath[data->filepath_index])) == 0) {
+            g_ascii_strncasecmp(data->filepath[data->filepath_index], dr->filename, strlen(data->filepath[data->filepath_index])) == 0) {
             data->filepath_index++;
             break;
         }
-- 
2.21.0

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux