diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-12 08:43:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-12 08:43:34 -0400 |
commit | 670b77ddfab0f4eddbe539964aba83d446d48129 (patch) | |
tree | 5b159fe9bd52169e05cdc60db5a48a5c5ac9602a /src/libshared/machine-pool.c | |
parent | 23708daf3ba69ba9880102b4f720a3842883332e (diff) | |
parent | 34dbdee3b2f122d2ef903a368b172e75f962b66a (diff) |
Merge branch 'lukeshu/postmove' into 'lukeshu/master'
Diffstat (limited to 'src/libshared/machine-pool.c')
-rw-r--r-- | src/libshared/machine-pool.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libshared/machine-pool.c b/src/libshared/machine-pool.c index 056b5bfae5..c36efa0102 100644 --- a/src/libshared/machine-pool.c +++ b/src/libshared/machine-pool.c @@ -24,6 +24,7 @@ #include <stdbool.h> #include <stdio.h> #include <stdlib.h> +#include <sys/file.h> #include <sys/ioctl.h> #include <sys/mount.h> #include <sys/prctl.h> @@ -138,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); } @@ -238,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; |