From: Lennart Poettering Date: Thu, 19 Dec 2024 13:26:14 +0000 (+0100) Subject: nspawn: use DEVNUM_FORMAT_STR/DEVNUM_FORMAT_VAL more X-Git-Tag: v258-rc1~1808^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=595ca10f3768d13000c41c8e51239b90d9cbd7ba;p=thirdparty%2Fsystemd.git nspawn: use DEVNUM_FORMAT_STR/DEVNUM_FORMAT_VAL more --- diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index d465cd58e25..fbddc5948b0 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -42,6 +42,7 @@ #include "copy.h" #include "cpu-set-util.h" #include "dev-setup.h" +#include "devnum-util.h" #include "discover-image.h" #include "dissect-image.h" #include "env-util.h" @@ -2323,7 +2324,7 @@ static int copy_devnode_one(const char *dest, const char *node, bool ignore_mkno return log_error_errno(r, "Failed to create '%s': %m", dn); _cleanup_free_ char *sl = NULL; - if (asprintf(&sl, "%s/%u:%u", dn, major(st.st_rdev), minor(st.st_rdev)) < 0) + if (asprintf(&sl, "%s/" DEVNUM_FORMAT_STR, dn, DEVNUM_FORMAT_VAL(st.st_rdev)) < 0) return log_oom(); _cleanup_free_ char *prefixed = path_join(dest, sl);