diff options
author | Scott James Remnant <scott@ubuntu.com> | 2005-11-22 15:44:02 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-11-22 15:44:02 +0100 |
commit | 0da0efb2b622435209d183b49e2d16d426142b2c (patch) | |
tree | 189196a8ece9de51fd6589ad4c54db4d86bb5205 /udev_remove.c | |
parent | cfd0fc66054cb7eab4989d214e4f8552dc2bf0b8 (diff) |
move delete_path() to utils
Diffstat (limited to 'udev_remove.c')
-rw-r--r-- | udev_remove.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/udev_remove.c b/udev_remove.c index 8351860472..6efa17eb7c 100644 --- a/udev_remove.c +++ b/udev_remove.c @@ -34,35 +34,6 @@ #include "udev_version.h" #include "logging.h" -static int delete_path(const char *path) -{ - char *pos; - int retval; - - pos = strrchr(path, '/'); - while (1) { - *pos = '\0'; - pos = strrchr(path, '/'); - - /* don't remove the last one */ - if ((pos == path) || (pos == NULL)) - break; - - /* remove if empty */ - retval = rmdir(path); - if (errno == ENOENT) - retval = 0; - if (retval) { - if (errno == ENOTEMPTY) - return 0; - err("rmdir(%s) failed: %s", path, strerror(errno)); - break; - } - dbg("removed '%s'", path); - } - return 0; -} - static int delete_node(struct udevice *udev) { char filename[PATH_SIZE]; |