]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/fileeq: Extend debug message
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 18 Feb 2026 20:10:21 +0000 (21:10 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 18 Feb 2026 20:21:46 +0000 (21:21 +0100)
Log how many bytes were actually read, not just how many were requested.
This difference occurs for files smaller than 32 bytes.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/fileeq.c

index 3efe3434052430e25dfc4b1f406c4ec3c1f58994..d76ee6e673badc21b298bb63e740e01932b16ac5 100644 (file)
@@ -473,7 +473,7 @@ static ssize_t get_intro(struct ul_fileeq *eq, struct ul_fileeq_data *data,
                if (fd < 0)
                        return -1;
                rsz = read_all(fd, (char *) data->intro, sizeof(data->intro));
-               DBG(DATA, ul_debugobj(data, " read %zu bytes intro", sizeof(data->intro)));
+               DBG(DATA, ul_debugobj(data, " read %zd bytes [%zu wanted] intro", rsz, sizeof(data->intro)));
                if (rsz < 0)
                        return -1;
                data->nblocks = 1;