From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH 5/7] kvm tools: Add help and info messages to 'kvm setup' Date: Thu, 13 Oct 2011 11:32:44 +0200 Message-ID: <1318498366-7824-5-git-send-email-levinsasha928@gmail.com> References: <1318498366-7824-1-git-send-email-levinsasha928@gmail.com> Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, Sasha Levin To: penberg@cs.helsinki.fi Return-path: Received: from mail-ey0-f174.google.com ([209.85.215.174]:61705 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754248Ab1JMJdT (ORCPT ); Thu, 13 Oct 2011 05:33:19 -0400 Received: by mail-ey0-f174.google.com with SMTP id 27so1629727eye.19 for ; Thu, 13 Oct 2011 02:33:18 -0700 (PDT) In-Reply-To: <1318498366-7824-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Suggested-by: Ingo Molnar Signed-off-by: Sasha Levin --- tools/kvm/builtin-setup.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-setup.c b/tools/kvm/builtin-setup.c index 3e569e7..a2e893c 100644 --- a/tools/kvm/builtin-setup.c +++ b/tools/kvm/builtin-setup.c @@ -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; } -- 1.7.7