chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix assertion failure when resuming from sleep/suspend
[elogind.git]
/
src
/
basic
/
rm-rf.c
diff --git
a/src/basic/rm-rf.c
b/src/basic/rm-rf.c
index d35d172958fb6ea3f3cc154f72e5d3f3cfff9a76..d3c04f11f8abf0f17b221e93f7ad0948387e5e4f 100644
(file)
--- a/
src/basic/rm-rf.c
+++ b/
src/basic/rm-rf.c
@@
-122,7
+122,7
@@
int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
/* This could be a subvolume, try to remove it */
r = btrfs_subvol_remove_fd(fd, de->d_name, true);
if (r < 0) {
/* This could be a subvolume, try to remove it */
r = btrfs_subvol_remove_fd(fd, de->d_name, true);
if (r < 0) {
- if (r != -ENOTTY && r != -EINVAL) {
+
if (r != -ENOTTY && r != -EINVAL) {
if (ret == 0)
ret = r;
if (ret == 0)
ret = r;
@@
-138,7
+138,7
@@
int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
safe_close(subdir_fd);
continue;
}
safe_close(subdir_fd);
continue;
}
- }
+
}
#endif // 0
/* We pass REMOVE_PHYSICAL here, to avoid
#endif // 0
/* We pass REMOVE_PHYSICAL here, to avoid
@@
-177,18
+177,18
@@
int rm_rf(const char *path, RemoveFlags flags) {
return -EPERM;
}
return -EPERM;
}
+#if 0
if ((flags & (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) == (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) {
/* Try to remove as subvolume first */
if ((flags & (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) == (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) {
/* Try to remove as subvolume first */
-#if 0
- r = btrfs_subvol_remove(path, true);
+ r = btrfs_subvol_remove(path, true);
if (r >= 0)
return r;
if (r != -ENOTTY && r != -EINVAL && r != -ENOTDIR)
return r;
if (r >= 0)
return r;
if (r != -ENOTTY && r != -EINVAL && r != -ENOTDIR)
return r;
-#endif // 0
/* Not btrfs or not a subvolume */
}
/* 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) {
fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
if (fd < 0) {