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] switch device type to enum
[elogind.git]
/
udev_remove.c
diff --git
a/udev_remove.c
b/udev_remove.c
index baafdea51ae9020e67161c702709e33b432cb734..0ba6962cad660f481714d91ebb2c235a79e0b363 100644
(file)
--- a/
udev_remove.c
+++ b/
udev_remove.c
@@
-85,7
+85,7
@@
static int delete_node(struct udevice *udev)
if (stat(filename, &stats) != 0)
return -1;
if (stat(filename, &stats) != 0)
return -1;
- if (udev->
major && stats.st_rdev != makedev(udev->major, udev->minor)
) {
+ if (udev->
devt && stats.st_rdev != udev->devt
) {
info("device node '%s' points to a different device, skip removal", filename);
return -1;
}
info("device node '%s' points to a different device, skip removal", filename);
return -1;
}
@@
-147,7
+147,7
@@
int udev_remove_device(struct udevice *udev)
const char *temp;
int retval;
const char *temp;
int retval;
- if (udev->type !=
'b' && udev->type != 'c'
)
+ if (udev->type !=
BLOCK && udev->type != CLASS
)
return 0;
retval = udev_db_get_device(udev);
return 0;
retval = udev_db_get_device(udev);