[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC][PATCH v1 1/3] Add xen-hvm-param
On 09/02/14 08:47, Andrew Cooper wrote: On 02/09/14 13:07, Don Slutz wrote:A tool to get and set hvm param. Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx> --- ... + snprintf(hvm_param_name[HVM_PARAM_VMPORT_BUILD_NUMBER_VALUE], + sizeof(hvm_param_name[HVM_PARAM_VMPORT_BUILD_NUMBER_VALUE]), + "Vmport_Build_Number_Value"); + snprintf(hvm_param_name[HVM_PARAM_VMPORT_RESET_TIME], + sizeof(hvm_param_name[HVM_PARAM_VMPORT_RESET_TIME]), "Vmport_Reset_Time");Surely all these snprintfs can be replaced with some compiler magic, to vastly reduce its complexity. static const char * hvm_param_names[] = { "Callback_Irq", "Store_Pfn", ... }; static const char *hvm_param_name(unsigned int param) { return param < ARRAY_SIZE(hvm_param_names) ? hvm_param_names[param] : "Unknown"; } There might be. I just went with the fastest way to do this (an emacs macro...) It might also be nice to have a "dump all" option. Yes. How about if only domain id specified, all are dumpped? -Don Slutz ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |