'Error parsing line' is no longer fatal (only g_warning() now).
authorshort <>
Sun, 5 Oct 2003 17:41:43 +0000 (17:41 +0000)
committershort <>
Sun, 5 Oct 2003 17:41:43 +0000 (17:41 +0000)
 - Linux kernel may also report bogus line content instead of empty lines.

src/install/libcaptive-install/proc_partitions.c

index 75508f7..110316e 100644 (file)
@@ -92,8 +92,10 @@ ntfs_volume *volume;
                         */
                        continue;
                        }
-               if (4!=sscanf(line,"%u%u%llu%100s",&major,&minor,&blocks,device+strlen("/dev/")))
-                       g_error(_("Error parsing line of \"%s\": %s"),FILENAME_PROC_PARTITIONS,line);
+               if (4!=sscanf(line,"%u%u%llu%100s",&major,&minor,&blocks,device+strlen("/dev/"))) {
+                       g_warning(_("Error parsing line of \"%s\": %s"),FILENAME_PROC_PARTITIONS,line);
+                       continue;
+                       }
                memcpy(device,"/dev/",strlen("/dev/"));
                if (!(volume=ntfs_mount(device,MS_RDONLY))) {
                        if (msg_verbose)
@@ -108,6 +110,6 @@ ntfs_volume *volume;
                        g_warning(_("Error unmounting volume: %s"),device);
                }
        if (fclose(fpartitions))
-               g_error(_("Cannot close \"%s\": %m"),FILENAME_PROC_PARTITIONS);
+               g_warning(_("Cannot close \"%s\": %m"),FILENAME_PROC_PARTITIONS);
        return proc_partitions_ntfs_hash;
 }