From 1846031d472f85b44d873bce76c6ceca9649efbd Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Fri, 25 Jul 2014 19:14:16 -0700 Subject: [PATCH] oxenstored: also fail if only 1 socket was given by systemd Reported-by: Ian Campbell Signed-off-by: Luis R. Rodriguez Acked-by: Ian Campbell --- 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 a368ac10e1..623592c95f 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.30.2