diff options
author | David Zeuthen <david@fubar.dk> | 2004-10-21 21:27:44 +0000 |
---|---|---|
committer | David Zeuthen <david@fubar.dk> | 2004-10-21 21:27:44 +0000 |
commit | fffb51a6711ba4971168937cf734a7bc54800799 (patch) | |
tree | 85e593d5f0ef197dcee7d07ffaf15950378228c3 /tools | |
parent | 193aef470abf51839630f9d5e1b2ab75c9fe6775 (diff) |
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 <dcbw@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/fstab-sync.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)) { |