qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 1/5] Exit if incoming migration fails


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 1/5] Exit if incoming migration fails
Date: Mon, 24 May 2010 11:02:06 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4


-void qemu_start_incoming_migration(const char *uri)
+int qemu_start_incoming_migration(const char *uri)
  {
      const char *p;
+    int ret = -1;

Maybe -ENOSYS or -EPROTONOSUPPORT, since the *_start_incoming_migration functions return a negative errno value?

      if (incoming) {
-        qemu_start_incoming_migration(incoming);
+        if (qemu_start_incoming_migration(incoming)<  0) {
+            fprintf(stderr, "unknown migration protocol: %s\n", incoming);
+            exit(1);
+        }

Dually, if you have a failure from *_start_incoming_migration, this fprintf is spurious.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]