Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rump_halt Check sys_reboot() return value now that i...



details:   https://anonhg.NetBSD.org/src/rev/7e5cf7b4cd2d
branches:  trunk
changeset: 761259:7e5cf7b4cd2d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Jan 22 13:43:07 2011 +0000

description:
Check sys_reboot() return value now that it's possible.

diffstat:

 usr.bin/rump_halt/rump.halt.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r a758561cbaa4 -r 7e5cf7b4cd2d usr.bin/rump_halt/rump.halt.c
--- a/usr.bin/rump_halt/rump.halt.c     Sat Jan 22 13:41:22 2011 +0000
+++ b/usr.bin/rump_halt/rump.halt.c     Sat Jan 22 13:43:07 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.halt.c,v 1.1 2010/12/12 12:48:31 pooka Exp $      */
+/*     $NetBSD: rump.halt.c,v 1.2 2011/01/22 13:43:07 pooka Exp $      */
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rump.halt.c,v 1.1 2010/12/12 12:48:31 pooka Exp $");
+__RCSID("$NetBSD: rump.halt.c,v 1.2 2011/01/22 13:43:07 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -84,7 +84,8 @@
        if (rumpclient_init() == -1)
                err(1, "init failed");
 
-       rump_sys_reboot(flags, NULL);
+       if (rump_sys_reboot(flags, NULL) == -1)
+               err(1, "reboot");
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index