Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2018 18:12:31 +0000 (UTC)
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338688 - head/sbin/reboot
Message-ID:  <201809141812.w8EICVnq010387@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vangyzen
Date: Fri Sep 14 18:12:30 2018
New Revision: 338688
URL: https://svnweb.freebsd.org/changeset/base/338688

Log:
  Fix "fasthalt" to halt instead of reboot
  
  fasthalt has behaved like reboot, instead of like halt, since r228408
  (2011, 10.0-RELEASE).  Fix it.  One wonders if anyone will notice.
  
  Approved by:	re (kib)
  MFC after:	3 days
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sbin/reboot/reboot.c

Modified: head/sbin/reboot/reboot.c
==============================================================================
--- head/sbin/reboot/reboot.c	Fri Sep 14 17:04:36 2018	(r338687)
+++ head/sbin/reboot/reboot.c	Fri Sep 14 18:12:30 2018	(r338688)
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
 	u_int pageins;
 	const char *user, *kernel = NULL;
 
-	if (strcmp(getprogname(), "halt") == 0) {
+	if (strstr(getprogname(), "halt") != NULL) {
 		dohalt = 1;
 		howto = RB_HALT;
 	} else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809141812.w8EICVnq010387>