]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Add help and info messages to 'kvm setup'
authorSasha Levin <levinsasha928@gmail.com>
Thu, 13 Oct 2011 09:32:44 +0000 (11:32 +0200)
committerPekka Enberg <penberg@kernel.org>
Thu, 13 Oct 2011 16:39:00 +0000 (19:39 +0300)
Suggested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-setup.c

index 3e569e7b14a2c7ea389cb74f7833dd23aa493b3c..a2e893ce922d92110b7fa2234e4a3ceb811fde2c 100644 (file)
@@ -47,6 +47,8 @@ static void parse_setup_options(int argc, const char **argv)
 
 void kvm_setup_help(void)
 {
+       printf("\nkvm setup creates a new rootfs and stores it under ~/.kvm-tools/ .\n"
+               "This can be used later by the '-d' parameter of 'kvm run'.\n");
        usage_with_options(setup_usage, setup_options);
 }
 
@@ -205,10 +207,18 @@ int kvm_setup_create_new(const char *guestfs_name)
 
 int kvm_cmd_setup(int argc, const char **argv, const char *prefix)
 {
+       int r;
+
        parse_setup_options(argc, argv);
 
        if (instance_name == NULL)
                kvm_setup_help();
 
-       return do_setup(instance_name);
+       r = do_setup(instance_name);
+       if (r == 0)
+               pr_info("Your new rootfs named %s has been created.\n"
+                       "You can now start it by running 'kvm run -d %s'\n",
+                       instance_name, instance_name);
+
+       return r;
 }