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>
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;