X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Frm-rf.c;h=d70e959d86011952f0b6d563fe6b635bddda2ec3;hp=bafd483be2bbf39f42d09257b03decbeb5bef9fc;hb=8af9597bdb2f17e0220c90299a322cfff3c4195f;hpb=ae695cb23d75f9b43f0a302285bfae6a7565d6cc;ds=sidebyside diff --git a/src/shared/rm-rf.c b/src/shared/rm-rf.c index bafd483be..d70e959d8 100644 --- a/src/shared/rm-rf.c +++ b/src/shared/rm-rf.c @@ -21,7 +21,6 @@ #include "util.h" #include "path-util.h" -#include "btrfs-util.h" #include "rm-rf.h" int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) { @@ -115,7 +114,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) { safe_close(subdir_fd); continue; } - +#if 0 if ((flags & REMOVE_SUBVOLUME) && st.st_ino == 256) { /* This could be a subvolume, try to remove it */ @@ -139,7 +138,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) { continue; } } - +#endif // /* We pass REMOVE_PHYSICAL here, to avoid * doing the fstatfs() to check the file * system type again for each directory */ @@ -175,7 +174,7 @@ int rm_rf(const char *path, RemoveFlags flags) { log_error("Attempted to remove entire root file system, and we can't allow that."); return -EPERM; } - +#if 0 if ((flags & (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) == (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) { /* Try to remove as subvolume first */ r = btrfs_subvol_remove(path, true); @@ -187,7 +186,7 @@ int rm_rf(const char *path, RemoveFlags flags) { /* Not btrfs or not a subvolume */ } - +#endif // 0 fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME); if (fd < 0) {