]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
logprint: Fix printing of AGF and AGI buffers
authorJan Kara <jack@suse.cz>
Fri, 18 Jul 2014 00:47:11 +0000 (10:47 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 18 Jul 2014 00:47:11 +0000 (10:47 +1000)
commitba24eb7c8288b1b21cbf00146a6740b2d3fd3128
treec323ac661913264f55ad055cf8e8eace352bee3a
parenta14d40939de7d38029f99c10bc237bb68e83d119
logprint: Fix printing of AGF and AGI buffers

Currently xfs_logprint doesn't show detailed data about AGF and AGI
buffers and instead always shows "Out of space". This is because
xfs_agf_t has additional fields and padding which we never read from
disk and thus buffer length is always smaller than the size of
xfs_agf_t or xfs_agi_t respectively.

Fix the problem by only making sure we have enough data in the buffer
to contain all the information we want to print.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
logprint/log_misc.c