X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_db.c;h=99d73bd5afba9d11f4cb7feb1f650e8236ddba75;hb=34bb5d057c99fa433392e0d5c17f604c8c111381;hp=b058351d27e35c8b38574ab50e1b8fe7c4fae1d3;hpb=554dde8e9a2e1e8bdf2816f04af985b227937c32;p=elogind.git diff --git a/udev_db.c b/udev_db.c index b058351d2..99d73bd5a 100644 --- a/udev_db.c +++ b/udev_db.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include "udev.h" @@ -81,8 +83,7 @@ int udev_db_add_device(struct udevice *udev) * create only a symlink with the name as the target * if we don't have any interesting data to remember */ - if (strcmp(udev->name, udev->dev->kernel_name) == 0 && - list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && + if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && !udev->partitions && !udev->ignore_remove) { dbg("nothing interesting to store, create symlink"); unlink(filename);