chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c9d36f
)
machined: drop btrfs subvolumes when removing container images
author
Lennart Poettering
<lennart@poettering.net>
Sun, 5 Apr 2015 09:28:04 +0000
(11:28 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:50:10 +0000
(07:50 +0100)
src/shared/machine-image.c
patch
|
blob
|
history
diff --git
a/src/shared/machine-image.c
b/src/shared/machine-image.c
index c5808af81efe27dfb13cdf6805f9b3b3318a3d25..f166e9410d0f1385cdad959a92a92cb8687c2e3c 100644
(file)
--- a/
src/shared/machine-image.c
+++ b/
src/shared/machine-image.c
@@
-363,11
+363,13
@@
int image_remove(Image *i) {
case IMAGE_DIRECTORY:
/* Allow deletion of read-only directories */
(void) chattr_path(i->path, false, FS_IMMUTABLE_FL);
-
- /* fall through */
+ return rm_rf(i->path, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
case IMAGE_RAW:
- return rm_rf(i->path, REMOVE_ROOT|REMOVE_PHYSICAL);
+ if (unlink(i->path) < 0)
+ return -errno;
+
+ return 0;
default:
return -EOPNOTSUPP;