From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: [PATCH v8 2/6] oxenstored: also fail if only 1 socket was given by systemd Date: Fri, 25 Jul 2014 19:14:16 -0700 Message-ID: <1406340860-8547-3-git-send-email-mcgrof@do-not-panic.com> References: <1406340860-8547-1-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XArVO-0002Cq-Rl for xen-devel@lists.xenproject.org; Sat, 26 Jul 2014 02:14:38 +0000 Received: by mail-pd0-f179.google.com with SMTP id ft15so6625161pdb.38 for ; Fri, 25 Jul 2014 19:14:35 -0700 (PDT) In-Reply-To: <1406340860-8547-1-git-send-email-mcgrof@do-not-panic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: "Luis R. Rodriguez" List-Id: xen-devel@lists.xenproject.org From: "Luis R. Rodriguez" Reported-by: Ian Campbell Signed-off-by: Luis R. Rodriguez --- tools/ocaml/xenstored/systemd_stubs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index a368ac1..623592c 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -72,7 +72,7 @@ CAMLprim value ocaml_sd_listen_fds(value connect_to) strerror(errno), errno); caml_failwith("ocaml_sd_listen_fds() failed to get any sockets"); - } else if (n > 2) { + } else if (n != 2) { fprintf(stderr, SD_ERR "Expected 2 fds but given %d\n", n); sd_notifyf(0, "STATUS=Mismatch on number (2): %s\n" "ERRNO=%d", -- 2.0.1