Hi, Dave and Oda
Great thanks!
OK, I understand. This is the first time I've ever heard of
the Fujitsu "sadump" facility.
The function name "check_netdump_xen()" is confusing because
the "real" netdump facility and xen kernels don't have any
relationship.
So I'd prefer to make it easier to understand what's going
on by doing something like this in main():
} else if (is_netdump(argv[optind], NETDUMP_LOCAL)) {
if (pc->flags & MEMORY_SOURCES) {
error(INFO,
"too many dumpfile arguments\n");
program_usage(SHORT_FORM);
}
pc->flags |= NETDUMP;
pc->dumpfile = argv[optind];
if (is_sadump_xen()) {
pc->readmem = read_kdump;
pc->writemem = write_kdump;
} else {
pc->readmem = read_netdump;
pc->writemem = write_netdump;
}
}
and then make is_sadump_xen() do this:
/*
* Fujitsu dom0/HV sadump-generated dumpfile, which requires
* the --p2m_mfn command line argument.
*/
int
is_sadump_xen()
{
if (xen_kdump_data.p2m_mfn) {
if (!XEN_CORE_DUMPFILE()) {
pc->flags |= XEN_CORE;
nd->xen_kdump_data = &xen_kdump_data;
nd->xen_kdump_data->last_mfn_read = BADVAL;
nd->xen_kdump_data->flags |= KDUMP_MFN_LIST;
}
return TRUE;
}
return FALSE;
}
Does that seem reasonable?
Yes! I think it is reasonable.
Best Regards,
Akio Takebe