OpenBSD CVS

CVS log for src/sbin/reboot/reboot.c


[BACK] Up to [local] / src / sbin / reboot

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.38 / (download) - annotate - [select for diffs], Tue Aug 22 00:30:16 2017 UTC (6 years, 9 months ago) by sf
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, HEAD
Changes since 1.37: +15 -4 lines
Diff to previous 1.37 (colored)

reboot: don't wait for processes to die if there are none

If processes are already dead, reduce wait times between SIGTERM and
SIGKILL and wait time after SIGKILL.  The reboot syscall will cause
another sync later on, therefore the long wait times are not necessary
for disk i/o, either.

"makes sense" deraadt@

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jun 16 06:46:54 2017 UTC (6 years, 11 months ago) by natano
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

s/CPU_LIDSUSPEND/CPU_LIDACTION/
ok mlarkin

Revision 1.36 / (download) - annotate - [select for diffs], Thu Mar 2 10:38:09 2017 UTC (7 years, 3 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.35: +5 -7 lines
Diff to previous 1.35 (colored)

Add a new sysctl machdep.lidaction. The sysctl works as follows:

machdep.lidaction=0	# do nothing
machdep.lidaction=1	# suspend
machdep.lidaction=2	# hibernate

lidsuspend is just an alias for lidaction, so if you change one, the
other one will have the same value. The plan is to remove
machdep.lidsuspend eventually when people have upgraded their
/ets/sysctl.conf.

discussed with deraadt, who came up with the new MIB name
no objections mlarkin
ok stsp halex jcs

Revision 1.35 / (download) - annotate - [select for diffs], Sat Aug 27 01:56:07 2016 UTC (7 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Pull in <sys/time.h> for struct timespec
<sys/fcntl.h> shouldn't be used by userspace; this already uses <fcntl.h>

ok deraadt@

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:00 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.33: +1 -2 lines
Diff to previous 1.33 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.33 / (download) - annotate - [select for diffs], Sat Feb 9 21:21:27 2013 UTC (11 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Ignore sysctl failure for CPU_LIDSUSPEND when errno is EOPNOTSUPP.
Just because CPU_LIDSUSPEND is defined in cpu.h does mean it is
actually supported by the hardware.  OK miod@ kettenis@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 10 12:58:26 2012 UTC (11 years, 11 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.31: +18 -1 lines
Diff to previous 1.31 (colored)

disable lidsuspend on shutdown

ok phessler@ mpf@ pirofti@ mpi@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jul 23 20:14:23 2010 UTC (13 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.30: +9 -1 lines
Diff to previous 1.30 (colored)

Block all signals before sending SIGTERM to all non-system processes.
This ensures that we reach the call to reboot(2) without being killed
by some other process.  OK deraadt@ nicm@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:34 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.29: +1 -15 lines
Diff to previous 1.29 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 11 01:53:07 2007 UTC (17 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

it's silly for reboot to poweroff.  adapted from diff by diana eichert

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jun 1 17:22:14 2006 UTC (18 years ago) by dhill
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

delint

ok moritz

Revision 1.27 / (download) - annotate - [select for diffs], Thu Apr 6 21:36:17 2006 UTC (18 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.26: +7 -4 lines
Diff to previous 1.26 (colored)

if "/etc/rc shutdown" exits 2, attempt powerdown. it does so if
rc.shutdown sets powerdown to YES.
From: Michele 'mydecay' Marchetto <mydecay@openbeer.it>
but didn't apply, so I redid & added comment to clarify
ok mickey theo

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 9 18:49:57 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.25: +15 -10 lines
Diff to previous 1.25 (colored)

variety of cleanups; nofsk@aanet.com.au and I

Revision 1.25 / (download) - annotate - [select for diffs], Mon Jun 2 20:06:16 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.24: +3 -7 lines
Diff to previous 1.24 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jul 3 22:32:33 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.23: +4 -6 lines
Diff to previous 1.23 (colored)

ansi

Revision 1.23 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:37 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Nov 5 07:39:17 2001 UTC (22 years, 7 months ago) by mpech
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

kill more registers;

millert@ ok

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jul 19 17:41:22 2001 UTC (22 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

#include <termios.h>

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 9 07:04:46 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

correct type on last arg to execl(); nordin@cse.ogi.edu

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 4 14:59:49 2001 UTC (23 years ago) by mickey
Branch: MAIN
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)

return from main() don't exit

Revision 1.18 / (download) - annotate - [select for diffs], Sun Apr 30 17:30:34 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)

Add missing fcntl.h

Revision 1.17 / (download) - annotate - [select for diffs], Fri Sep 3 18:11:50 1999 UTC (24 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

have shutdown code run /etc/rc with arg of "shutdown"; rc.shutdown becomes  completely admin-editable

Revision 1.16 / (download) - annotate - [select for diffs], Mon Aug 16 18:43:11 1999 UTC (24 years, 10 months ago) by art
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

we need to include sys/wait.h since we use waitpid here

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 19 00:10:00 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +24 -3 lines
Diff to previous 1.14 (colored)

run /etc/rc.shutdown on /dev/console

Revision 1.14 / (download) - annotate - [select for diffs], Fri Aug 7 20:17:32 1998 UTC (25 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.13: +5 -21 lines
Diff to previous 1.13 (colored)

delete the garbage which does not work

Revision 1.13 / (download) - annotate - [select for diffs], Wed Aug 5 07:37:37 1998 UTC (25 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

12 seconds not 30.  But I am just about to remove the kill and wait
patch.  Obviously it was never tested on a machine running a regular
compliment of services.  On such a machine, it causes a full 12 (was
30) second delay *EVERY TIME*.  That's COMPLETELY unreasonable.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 12 07:17:28 1998 UTC (25 years, 11 months ago) by angelos
Branch: MAIN
Changes since 1.11: +21 -5 lines
Diff to previous 1.11 (colored)

sync with NetBSD

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 25 00:09:03 1998 UTC (26 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.10: +8 -2 lines
Diff to previous 1.10 (colored)

ignore SIGPIPE; nathanw@MIT.EDU

Revision 1.10 / (download) - annotate - [select for diffs], Wed Sep 3 21:18:38 1997 UTC (26 years, 9 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.9: +18 -52 lines
Diff to previous 1.9 (colored)

use err()/warn()/__progname
document -d

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 25 19:13:10 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

#if __STDC__ --> #ifdef __STDC__

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 22 22:19:11 1997 UTC (26 years, 11 months ago) by downsj
Branch: MAIN
Changes since 1.7: +21 -9 lines
Diff to previous 1.7 (colored)

Support RB_POWERDOWN.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Apr 11 09:06:42 1997 UTC (27 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.6: +19 -2 lines
Diff to previous 1.6 (colored)

add support for a script called /etc/rc.shutdown

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jan 17 07:12:20 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

r?index -> strr?chr

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jan 15 23:41:38 1997 UTC (27 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jul 22 09:20:59 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +14 -4 lines
Diff to previous 1.3 (colored)

kill (-1, SIGTERM) may find no other processes; netbsd pr#2619, cgd

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 11 23:29:09 1996 UTC (27 years, 11 months ago) by weingart
Branch: MAIN
Changes since 1.2: +11 -3 lines
Diff to previous 1.2 (colored)

netbsd pr bin/2618 from cgd, fixed differently

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 23 14:32:12 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

update rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:43:46 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:43:46 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.