svn commit: r338688 - head/sbin/reboot

Eric van Gyzen vangyzen at FreeBSD.org
Fri Sep 14 18:12:31 UTC 2018


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


More information about the svn-src-head mailing list