summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-14 08:14:41 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-14 08:14:41 -0400
commita0796d1c1fb3e1de044f1d199838ae6b8d81ce55 (patch)
treeb0159125d98528d1b364b60eed6385e9813eead2
parent87836c67d8a6d9507c75594372af462d41b68fa9 (diff)
parent579afbea21f6439e97c141160ed1f7dd740eab0d (diff)
Merge pull request #2832 from evverx/fix-mkfs-btrfs-checking
Fix mkfs.btrfs checking
-rw-r--r--src/shared/machine-pool.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/shared/machine-pool.c b/src/shared/machine-pool.c
index f080b849a4..23890c63a0 100644
--- a/src/shared/machine-pool.c
+++ b/src/shared/machine-pool.c
@@ -139,7 +139,7 @@ static int setup_machine_raw(uint64_t size, sd_bus_error *error) {
execlp("mkfs.btrfs", "-Lvar-lib-machines", tmp, NULL);
if (errno == ENOENT)
- return 99;
+ _exit(99);
_exit(EXIT_FAILURE);
}
@@ -239,10 +239,8 @@ int setup_machine_directory(uint64_t size, sd_bus_error *error) {
}
r = mkfs_exists("btrfs");
- if (r == -ENOENT) {
- log_debug("mkfs.btrfs is missing, cannot create loopback file for /var/lib/machines.");
- return 0;
- }
+ if (r == 0)
+ return sd_bus_error_set_errnof(error, ENOENT, "Cannot set up /var/lib/machines, mkfs.btrfs is missing");
if (r < 0)
return r;