Пример #1
0
static int cmd_vcpu_exec(vmm_chardev_t *cdev, int argc, char **argv)
{
	int id = -1;
	int index = 0;

	if (argc > 3) {
		cmd_vcpu_usage(cdev);
		return VMM_EFAIL;
	}

	if (argc == 3) {
		id = vmm_str2int(argv[2], 10);
	}
	
	while (command[index].name) {
		if (vmm_strcmp(argv[1], command[index].name) == 0) {
			return command[index].function(cdev, id);
		}
		index++;
	}

	cmd_vcpu_usage(cdev);

	return VMM_EFAIL;
}
Пример #2
0
static int cmd_vcpu_help(struct vmm_chardev *cdev,
			 int argc, char **argv)
{
	cmd_vcpu_usage(cdev);
	return VMM_OK;
}
Пример #3
0
static int cmd_vcpu_help(vmm_chardev_t *cdev, int dummy)
{
	cmd_vcpu_usage(cdev);
	return VMM_OK;
}