From fffb51a6711ba4971168937cf734a7bc54800799 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Thu, 21 Oct 2004 21:27:44 +0000 Subject: Just see if there is a 'wireless' directory in sysfs; don't let the libsysfs copy try to open files cause that might fail on orinoco+hermes (RH bug 136591). Reported by Dan Williams --- tools/fstab-sync.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/fstab-sync.c b/tools/fstab-sync.c index bcfc704a..7dc37269 100644 --- a/tools/fstab-sync.c +++ b/tools/fstab-sync.c @@ -1510,6 +1510,9 @@ static boolean fs_table_line_is_mounted (FSTableLine *line) boolean is_mounted = FALSE; struct mntent *m; + if (line->block_device == NULL || line->mount_point == NULL) + goto out; + f = fopen (_PATH_MOUNTED, "r"); if (f == NULL) goto out; @@ -1539,6 +1542,9 @@ fs_table_remove_generated_entries (FSTable *table) line = table->lines; while (line != NULL) { + fstab_update_debug (_("%d: Seeing if line for dev='%s',mnt='%s' should be removed\n"), pid, line->block_device, line->mount_point); + fstab_update_debug (_("%d: is_generated=%d, is_mounted=%d\n"), pid, + fs_table_line_is_generated (line), fs_table_line_is_mounted (line)); /* don't remove generated line if device is mounted there */ if (fs_table_line_is_generated (line) && !fs_table_line_is_mounted (line)) { -- cgit v1.2.3