From: dongshengyuan <545258830@qq.com> Date: Mon, 29 Jun 2026 02:20:59 +0000 (+0800) Subject: tmpfiles: fix device node major:minor logging to use i->major_minor X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af02a393f59520fd7069c8e4a06691b22e5b1d80;p=thirdparty%2Fsystemd.git tmpfiles: fix device node major:minor logging to use i->major_minor The debug log after creating a device node passed major(i->mode) and minor(i->mode) to format the device number, but i->mode holds the file permission bits (e.g. 0644), not the device number. The device major:minor is stored in i->major_minor, which is also what mknodat() receives. Use that field instead so the log correctly reports the created device number. Signed-off-by: dongshengyuan --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 620ab9486e1..923c2c60f74 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -2569,10 +2569,10 @@ static int create_device( } } - log_debug("%s %s device node \"%s\" %u:%u.", + log_debug("%s %s device node \"%s\" " DEVNUM_FORMAT_STR ".", creation_mode_verb_to_string(creation), i->type == CREATE_BLOCK_DEVICE ? "block" : "char", - i->path, major(i->mode), minor(i->mode)); + i->path, DEVNUM_FORMAT_VAL(i->major_minor)); return fd_set_perms(c, i, fd, i->path, &st, creation);