diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-14 20:48:53 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-14 20:48:53 +0000 |
commit | e2f3591ee5cbb13269e27b8b606197af4f74051a (patch) | |
tree | 994a5eeca2ffa9e5afce1b5156e0304e569068bd | |
parent | 38a71f576c3cd15854733df33366092017762dbe (diff) |
cope with the EAGAIN API change for msgbuf_write()
ok benno
-rw-r--r-- | usr.sbin/dvmrpctl/dvmrpctl.c | 5 | ||||
-rw-r--r-- | usr.sbin/ikectl/ikectl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldapctl/ldapctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldpctl/ldpctl.c | 5 | ||||
-rw-r--r-- | usr.sbin/relayctl/relayctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripctl/ripctl.c | 5 | ||||
-rw-r--r-- | usr.sbin/snmpctl/snmpctl.c | 4 |
7 files changed, 17 insertions, 14 deletions
diff --git a/usr.sbin/dvmrpctl/dvmrpctl.c b/usr.sbin/dvmrpctl/dvmrpctl.c index 1fba47be384..6b3c90e3f94 100644 --- a/usr.sbin/dvmrpctl/dvmrpctl.c +++ b/usr.sbin/dvmrpctl/dvmrpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvmrpctl.c,v 1.10 2013/04/09 14:51:33 gilles Exp $ */ +/* $OpenBSD: dvmrpctl.c,v 1.11 2013/11/14 20:48:51 deraadt Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -28,6 +28,7 @@ #include <net/if_types.h> #include <err.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -172,7 +173,7 @@ main(int argc, char *argv[]) } while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) < 0) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { diff --git a/usr.sbin/ikectl/ikectl.c b/usr.sbin/ikectl/ikectl.c index c1fb1dd3545..1c5a04eef91 100644 --- a/usr.sbin/ikectl/ikectl.c +++ b/usr.sbin/ikectl/ikectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikectl.c,v 1.17 2013/08/16 19:47:42 guenther Exp $ */ +/* $OpenBSD: ikectl.c,v 1.18 2013/11/14 20:48:52 deraadt Exp $ */ /* * Copyright (c) 2007-2013 Reyk Floeter <reyk@openbsd.org> @@ -313,7 +313,7 @@ main(int argc, char *argv[]) } while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) < 0) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { diff --git a/usr.sbin/ldapctl/ldapctl.c b/usr.sbin/ldapctl/ldapctl.c index f6af96a52fd..5c7b52fd6df 100644 --- a/usr.sbin/ldapctl/ldapctl.c +++ b/usr.sbin/ldapctl/ldapctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldapctl.c,v 1.4 2010/06/30 21:37:30 martinh Exp $ */ +/* $OpenBSD: ldapctl.c,v 1.5 2013/11/14 20:48:52 deraadt Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se> @@ -331,7 +331,7 @@ main(int argc, char *argv[]) } while (ibuf.w.queued) - if (msgbuf_write(&ibuf.w) < 0) + if (msgbuf_write(&ibuf.w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c index ac38dc7ab14..135bf962e73 100644 --- a/usr.sbin/ldpctl/ldpctl.c +++ b/usr.sbin/ldpctl/ldpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpctl.c,v 1.15 2013/06/04 02:40:17 claudio Exp $ +/* $OpenBSD: ldpctl.c,v 1.16 2013/11/14 20:48:52 deraadt Exp $ * * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -28,6 +28,7 @@ #include <netmpls/mpls.h> #include <err.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -175,7 +176,7 @@ main(int argc, char *argv[]) } while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) < 0) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { diff --git a/usr.sbin/relayctl/relayctl.c b/usr.sbin/relayctl/relayctl.c index 7b97498f7f9..80cee739129 100644 --- a/usr.sbin/relayctl/relayctl.c +++ b/usr.sbin/relayctl/relayctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayctl.c,v 1.48 2013/04/27 16:39:29 benno Exp $ */ +/* $OpenBSD: relayctl.c,v 1.49 2013/11/14 20:48:52 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -203,7 +203,7 @@ main(int argc, char *argv[]) } while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) < 0) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { diff --git a/usr.sbin/ripctl/ripctl.c b/usr.sbin/ripctl/ripctl.c index 7ca78a5588f..dcca2131dc0 100644 --- a/usr.sbin/ripctl/ripctl.c +++ b/usr.sbin/ripctl/ripctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ripctl.c,v 1.11 2013/04/09 14:51:33 gilles Exp $ +/* $OpenBSD: ripctl.c,v 1.12 2013/11/14 20:48:52 deraadt Exp $ * * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -27,6 +27,7 @@ #include <net/if_types.h> #include <err.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -167,7 +168,7 @@ main(int argc, char *argv[]) } while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) < 0) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { diff --git a/usr.sbin/snmpctl/snmpctl.c b/usr.sbin/snmpctl/snmpctl.c index 8c18f822689..ad24c2f2163 100644 --- a/usr.sbin/snmpctl/snmpctl.c +++ b/usr.sbin/snmpctl/snmpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpctl.c,v 1.18 2013/10/01 17:20:39 reyk Exp $ */ +/* $OpenBSD: snmpctl.c,v 1.19 2013/11/14 20:48:52 deraadt Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -181,7 +181,7 @@ main(int argc, char *argv[]) } while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) < 0) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (!done) { |