From: Darrick J. Wong <djwong@xxxxxxxxxx> Fix logprint to print "ATTRI: name" and "ATTRI: newname" consistently. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- logprint/log_redo.c | 15 +++++++++------ logprint/logprint.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/logprint/log_redo.c b/logprint/log_redo.c index a90abc2d8..f0d64ae9f 100644 --- a/logprint/log_redo.c +++ b/logprint/log_redo.c @@ -720,7 +720,8 @@ xlog_print_trans_attri( (*i)++; head = (xlog_op_header_t *)*ptr; xlog_print_op_header(head, *i, ptr); - error = xlog_print_trans_attri_name(ptr, be32_to_cpu(head->oh_len)); + error = xlog_print_trans_attri_name(ptr, + be32_to_cpu(head->oh_len), "name"); if (error) goto error; } @@ -730,7 +731,8 @@ xlog_print_trans_attri( (*i)++; head = (xlog_op_header_t *)*ptr; xlog_print_op_header(head, *i, ptr); - error = xlog_print_trans_attri_name(ptr, be32_to_cpu(head->oh_len)); + error = xlog_print_trans_attri_name(ptr, + be32_to_cpu(head->oh_len), "newname"); if (error) goto error; } @@ -752,15 +754,16 @@ xlog_print_trans_attri( int xlog_print_trans_attri_name( char **ptr, - uint src_len) + uint src_len, + const char *tag) { - printf(_("ATTRI: name len:%u\n"), src_len); + printf(_("ATTRI: %s len:%u\n"), tag, src_len); print_or_dump(*ptr, src_len); *ptr += src_len; return 0; -} /* xlog_print_trans_attri */ +} int xlog_print_trans_attri_value( @@ -823,7 +826,7 @@ xlog_recover_print_attri( if (f->alfi_nname_len > 0) { region++; - printf(_("ATTRI: nname len:%u\n"), f->alfi_nname_len); + printf(_("ATTRI: newname len:%u\n"), f->alfi_nname_len); print_or_dump((char *)item->ri_buf[region].i_addr, f->alfi_nname_len); } diff --git a/logprint/logprint.h b/logprint/logprint.h index b4479c240..067226ffb 100644 --- a/logprint/logprint.h +++ b/logprint/logprint.h @@ -59,7 +59,7 @@ extern void xlog_recover_print_bud(struct xlog_recover_item *item); #define MAX_ATTR_VAL_PRINT 128 extern int xlog_print_trans_attri(char **ptr, uint src_len, int *i); -extern int xlog_print_trans_attri_name(char **ptr, uint src_len); +extern int xlog_print_trans_attri_name(char **ptr, uint src_len, const char *tag); extern int xlog_print_trans_attri_value(char **ptr, uint src_len, int value_len); extern void xlog_recover_print_attri(struct xlog_recover_item *item); extern int xlog_print_trans_attrd(char **ptr, uint len);