]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
When checking nttyFDs to see if it is != 1, be sure to use '1' and not '-1'
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 8 Dec 2011 14:57:13 +0000 (14:57 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 8 Dec 2011 15:48:49 +0000 (15:48 +0000)
* src/lxc/lxc_controller.c: Fix check for tty count

src/lxc/lxc_controller.c

index 43414ba40b7b315c3674b2ec1ead5812ac2a4e6c..bb936eeaa3593fc5eaf3241f54522aacc5a69b87 100644 (file)
@@ -1388,9 +1388,9 @@ lxcControllerRun(virDomainDefPtr def,
             VIR_FREE(devptmx);
         }
     } else {
-        if (nttyFDs != -1) {
-            lxcError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                     _("Expected exactly one TTY fd"));
+        if (nttyFDs != 1) {
+            lxcError(VIR_ERR_CONFIG_UNSUPPORTED,
+                     _("Expected exactly one TTY fd, but got %zu"), nttyFDs);
             goto cleanup;
         }
     }