chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] udev spec file bits
[elogind.git]
/
udev-remove.c
diff --git
a/udev-remove.c
b/udev-remove.c
index cd917af193e6a05a128bebdba51720480ed25a0b..9862a6f201baf757cfb91b345dcde8dfef2383f8 100644
(file)
--- a/
udev-remove.c
+++ b/
udev-remove.c
@@
-31,6
+31,7
@@
#include "udev.h"
#include "udev_version.h"
#include "namedev.h"
#include "udev.h"
#include "udev_version.h"
#include "namedev.h"
+#include "udevdb.h"
#include "libsysfs/libsysfs.h"
#include "libsysfs/libsysfs.h"
@@
-44,6
+45,11
@@
static char *get_name(char *dev, int major, int minor)
static char name[100];
char *temp;
static char name[100];
char *temp;
+ temp = udevdb_get_udevice_by_sysfs(dev);
+ dbg("udevdb_get_udevice_by_sysfs returned %s", temp);
+ if (temp != NULL)
+ return temp;
+
temp = strrchr(dev, '/');
if (temp == NULL)
return NULL;
temp = strrchr(dev, '/');
if (temp == NULL)
return NULL;
@@
-80,9
+86,10
@@
int udev_remove_device(char *device, char *subsystem)
goto exit;
}
goto exit;
}
+ udevdb_delete_udevice(name);
+
return delete_node(name);
exit:
return retval;
}
return delete_node(name);
exit:
return retval;
}
-