]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Improve compat message format
authorAsias He <asias.hejun@gmail.com>
Tue, 5 Jun 2012 16:40:43 +0000 (00:40 +0800)
committerPekka Enberg <penberg@kernel.org>
Tue, 5 Jun 2012 20:31:39 +0000 (23:31 +0300)
---------
Before:
---------
*** Compatibility Warning ***

        virtio-blk device was not detected

While you have requested a virtio-blk device, the guest kernel did not initialize it.
Please make sure that the guest kernel was compiled with CONFIG_VIRTIO_BLK=y enabled in its .config

*** Compatibility Warning ***

        virtio-net device was not detected

While you have requested a virtio-net device, the guest kernel did not initialize it.
Please make sure that the guest kernel was compiled with CONFIG_VIRTIO_NET=y enabled in its .config

  # KVM session ended normally.

---------
After:
---------
  # KVM compatibility warning.
        virtio-blk device was not detected.
        While you have requested a virtio-blk device, the guest kernel did not initialize it.
        Please make sure that the guest kernel was compiled with CONFIG_VIRTIO_BLK=y enabled in .config.

  # KVM compatibility warning.
        virtio-net device was not detected.
        While you have requested a virtio-net device, the guest kernel did not initialize it.
        Please make sure that the guest kernel was compiled with CONFIG_VIRTIO_NET=y enabled in .config.

  # KVM session ended normally.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/guest_compat.c
tools/kvm/virtio/core.c

index 43b9035f1866759f1fa545d6178ff66c55cc269c..fd4704b20b1698b6e72a4f8077eebc3dc2d13192 100644 (file)
@@ -86,7 +86,7 @@ int compat__print_all_messages(void)
 
                msg = list_first_entry(&messages, struct compat_message, list);
 
-               printf("\n\n*** Compatibility Warning ***\n\n\t%s\n\n%s\n",
+               printf("\n  # KVM compatibility warning.\n\t%s\n\t%s\n",
                        msg->title, msg->desc);
 
                list_del(&msg->list);
index 8e0f63ba4e0aa6bb8b4d5f6534bbf890fef35b37..2dfb828d177f6e8dd2a1e8a1fd594aac665afb4b 100644 (file)
@@ -217,11 +217,11 @@ int virtio_compat_add_message(const char *device, const char *config)
                return -ENOMEM;
        }
 
-       snprintf(title, len, "%s device was not detected", device);
+       snprintf(title, len, "%s device was not detected.", device);
        snprintf(desc,  len, "While you have requested a %s device, "
                             "the guest kernel did not initialize it.\n"
-                            "Please make sure that the guest kernel was "
-                            "compiled with %s=y enabled in its .config",
+                            "\tPlease make sure that the guest kernel was "
+                            "compiled with %s=y enabled in .config.",
                             device, config);
 
        compat_id = compat__add_message(title, desc);