chiark / gitweb /
udevtest: don't try to delete symlinks
authorKay Sievers <kay.sievers@suse.de>
Sat, 15 Apr 2006 17:49:15 +0000 (19:49 +0200)
committerKay Sievers <kay.sievers@suse.de>
Sat, 15 Apr 2006 17:49:15 +0000 (19:49 +0200)
udev_node.c

index 86fdcd3..2a30fe3 100644 (file)
@@ -249,10 +249,12 @@ void udev_node_remove_symlinks(struct udevice *udev)
                        }
 
                        info("removing symlink '%s'", filename);
-                       unlink(filename);
+                       if (!udev->test_run) {
+                               unlink(filename);
 
-                       if (strchr(filename, '/'))
-                               delete_path(filename);
+                               if (strchr(filename, '/'))
+                                       delete_path(filename);
+                       }
 
                        strlcat(symlinks, filename, sizeof(symlinks));
                        strlcat(symlinks, " ", sizeof(symlinks));