parted/parted-1.8.8-avoid-none-stat.patch
2009-01-22 13:00:07 +00:00

14 lines
592 B
Diff

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 83e24c8..8734ab7 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2107,6 +2107,8 @@ _mount_table_search (const char* file_name, dev_t dev)
return 0;
while (fgets (line, 512, file)) {
junk = sscanf (line, "%s", part_name);
+ if (part_name[0] != '/')
+ continue;
if (stat (part_name, &part_stat) == 0) {
if (part_stat.st_rdev == dev) {
fclose (file);