#include <kvm/util.h>
#include <kvm/kvm-cmd.h>
#include <kvm/builtin-help.h>
+#include <kvm/kvm.h>
const char kvm_usage_string[] =
longest = strlen(common_cmds[i].name);
}
- puts(" The most commonly used kvm commands are:");
+ puts(" The most commonly used lkvm commands are:");
for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
printf(" %-*s ", longest, common_cmds[i].name);
puts(common_cmds[i].help);
static void kvm_help(void)
{
- printf("\n To start a simple non-privileged shell run 'kvm run'\n\n"
- "usage: %s\n\n", kvm_usage_string);
+ printf("\n To start a simple non-privileged shell run '%s run'\n\n"
+ "usage: %s\n\n", KVM_BINARY_NAME, kvm_usage_string);
list_common_cmds_help();
printf("\n %s\n\n", kvm_more_info_string);
}
fprintf(stderr, "\t%s\n", kernel);
k++;
}
- fprintf(stderr, "\nPlease see 'kvm run --help' for more options.\n\n");
+ fprintf(stderr, "\nPlease see '%s run --help' for more options.\n\n",
+ KVM_BINARY_NAME);
}
static u64 host_ram_size(void)
virtio_blk__init_all(kvm);
}
- printf(" # kvm run -k %s -m %Lu -c %d --name %s\n", kernel_filename, ram_size / 1024 / 1024, nrcpus, guest_name);
+ printf(" # %s run -k %s -m %Lu -c %d --name %s\n", KVM_BINARY_NAME,
+ kernel_filename, ram_size / 1024 / 1024, nrcpus, guest_name);
if (!kvm__load_kernel(kvm, kernel_filename, initrd_filename,
real_cmdline, vidmode))
void kvm_setup_help(void)
{
- printf("\nkvm setup creates a new rootfs under %s.\n"
- "This can be used later by the '-d' parameter of 'kvm run'.\n",
- kvm__get_dir());
+ printf("\n%s setup creates a new rootfs under %s.\n"
+ "This can be used later by the '-d' parameter of '%s run'.\n",
+ kvm__get_dir(), KVM_BINARY_NAME, KVM_BINARY_NAME);
usage_with_options(setup_usage, setup_options);
}
if (r == 0)
printf("A new rootfs '%s' has been created in '%s%s'.\n\n"
"You can now start it by running the following command:\n\n"
- " kvm run -d %s\n",
- instance_name, kvm__get_dir(), instance_name, instance_name);
+ " %s run -d %s\n",
+ instance_name, kvm__get_dir(), instance_name,
+ KVM_BINARY_NAME,instance_name);
else
printf("Unable to create rootfs in %s%s: %s\n",
kvm__get_dir(), instance_name, strerror(errno));
#define KVM_PID_FILE_PATH "/.kvm-tools/"
#define HOME_DIR getenv("HOME")
+#define KVM_BINARY_NAME "lkvm"
#define PAGE_SIZE (sysconf(_SC_PAGE_SIZE))