Date: Wed, 16 May 2012 17:26:15 +0000 (UTC) From: Jaakko Heinonen <jh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r235509 - stable/8/usr.sbin/wake Message-ID: <201205161726.q4GHQF7L053531@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jh Date: Wed May 16 17:26:14 2012 New Revision: 235509 URL: http://svn.freebsd.org/changeset/base/235509 Log: MFC r232102: Exit with proper status when wake() fails. PR: bin/153527 Modified: stable/8/usr.sbin/wake/wake.c Directory Properties: stable/8/usr.sbin/wake/ (props changed) Modified: stable/8/usr.sbin/wake/wake.c ============================================================================== --- stable/8/usr.sbin/wake/wake.c Wed May 16 15:53:38 2012 (r235508) +++ stable/8/usr.sbin/wake/wake.c Wed May 16 17:26:14 2012 (r235509) @@ -165,14 +165,17 @@ send_wakeup(int bpf, struct ether_addr c int main(int argc, char *argv[]) { - int n; + int n, rval; if (argc < 3) usage(); - for (n = 2; n < argc; n++) - if (wake(argv[1], argv[n])) + for (n = 2; n < argc; n++) { + if (wake(argv[1], argv[n])) { + rval = 1; warnx("error sending Wake on LAN frame over %s to %s", argv[1], argv[n]); - return (0); + } + } + exit(rval); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205161726.q4GHQF7L053531>