Print node layout plugin id of the format40 super-block. Signed-off-by: Edward Shishkin --- plugin/format/format40/format40_repair.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) --- a/plugin/format/format40/format40_repair.c +++ b/plugin/format/format40/format40_repair.c @@ -374,31 +374,33 @@ void format40_print(reiser4_format_ent_t uint16_t options) { format40_super_t *super; - reiser4_plug_t *plug; + reiser4_plug_t *tplug; + reiser4_plug_t *nplug; format40_t *format; - rid_t pid; - + rid_t tpid; + rid_t npid; + aal_assert("vpf-246", entity != NULL); aal_assert("umka-1290", stream != NULL); format = (format40_t *)entity; super = &format->super; - pid = get_sb_policy(super); + tpid = get_sb_policy(super); + npid = get_sb_node_pid(super); + + if (!(tplug = format40_core->factory_ops.ifind(POLICY_PLUG_TYPE, tpid))) + aal_error("Can't find tail policy plugin by its id 0x%x.", tpid); + + if (!(nplug = format40_core->factory_ops.ifind(NODE_PLUG_TYPE, npid))) + aal_error("Can't find node plugin by its id 0x%x.", npid); - if (!(plug = format40_core->factory_ops.ifind(POLICY_PLUG_TYPE, pid))) { - aal_error("Can't find tail policy plugin by its id 0x%x.", pid); - } - aal_stream_format(stream, "Format super block (%lu):\n", FORMAT40_BLOCKNR(format->blksize)); - aal_stream_format(stream, "plugin:\t\t%s\n", + aal_stream_format(stream, "format:\t\t%s\n", entity->plug->p.label); - aal_stream_format(stream, "description:\t%s\n", - entity->plug->p.desc); - aal_stream_format(stream, "version:\t%u\n", get_sb_version(super)); @@ -420,8 +422,11 @@ void format40_print(reiser4_format_ent_t aal_stream_format(stream, "root block:\t%llu\n", get_sb_root_block(super)); + aal_stream_format(stream, "node plugin:\t0x%x (%s)\n", + npid, nplug ? nplug->label: "absent"); + aal_stream_format(stream, "tail policy:\t0x%x (%s)\n", - pid, plug ? plug->label: "absent"); + tpid, tplug ? tplug->label: "absent"); aal_stream_format(stream, "next oid:\t0x%llx\n", get_sb_oid(super));