X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnspawn%2Fnspawn.c;h=48ef7d07e21e4fd4f3ddfda5e24ef38d23cd388a;hb=f08c4c08c7c2ce0fdfb4cf49642b00fbfb15185f;hp=25f835c230fc3807e289dde074e084dca0405b25;hpb=4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f;p=elogind.git diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 25f835c23..48ef7d07e 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -808,8 +808,8 @@ static int mount_tmpfs(const char *dest) { return log_oom(); r = mkdir_label(where, 0755); - if (r < 0 && errno != EEXIST) - return log_error_errno(r, "creating mount point for tmpfs %s failed: %m", where); + if (r < 0 && r != -EEXIST) + return log_error_errno(r, "Creating mount point for tmpfs %s failed: %m", where); if (mount("tmpfs", where, "tmpfs", MS_NODEV|MS_STRICTATIME, *o) < 0) return log_error_errno(errno, "tmpfs mount to %s failed: %m", where); @@ -2078,7 +2078,14 @@ static int dissect_image( bool *secondary) { #ifdef HAVE_BLKID - int home_nr = -1, root_nr = -1, secondary_root_nr = -1, srv_nr = -1; + int home_nr = -1, srv_nr = -1; +#ifdef GPT_ROOT_NATIVE + int root_nr = -1; +#endif +#ifdef GPT_ROOT_SECONDARY + int secondary_root_nr = -1; +#endif + _cleanup_free_ char *home = NULL, *root = NULL, *secondary_root = NULL, *srv = NULL; _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; _cleanup_udev_device_unref_ struct udev_device *d = NULL; @@ -2544,7 +2551,7 @@ static int change_uid_gid(char **_home) { truncate_nl(line); - wait_for_terminate_and_warn("getent passwd", pid); + wait_for_terminate_and_warn("getent passwd", pid, true); x = strchr(line, ':'); if (!x) { @@ -2628,7 +2635,7 @@ static int change_uid_gid(char **_home) { truncate_nl(line); - wait_for_terminate_and_warn("getent initgroups", pid); + wait_for_terminate_and_warn("getent initgroups", pid, true); /* Skip over the username and subsequent separator whitespace */ x = line;