From owner-svn-src-all@freebsd.org Tue Jul 10 00:01:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 686361043268; Tue, 10 Jul 2018 00:01:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A9878E9D8; Tue, 10 Jul 2018 00:01:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFC511C0E2; Tue, 10 Jul 2018 00:01:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6A01Eu9048989; Tue, 10 Jul 2018 00:01:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6A01E3F048987; Tue, 10 Jul 2018 00:01:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807100001.w6A01E3F048987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Jul 2018 00:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336148 - in head: lib/libc/sys sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libc/sys sys/sys X-SVN-Commit-Revision: 336148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2018 00:01:15 -0000 Author: imp Date: Tue Jul 10 00:01:14 2018 New Revision: 336148 URL: https://svnweb.freebsd.org/changeset/base/336148 Log: Tweak documentation to RB_ constants to reflect current use RB_ASKNAME is no longer instructions to the boot loader to request a prompt for which kernel to boot. Instead, it asks for what the root file system to use. RB_INITNAME is unused, and never has been in FreeBSD as far as I can tell. Remove it from the documentation and fix comment. RB_SELFTEST and RB_MINIROOT likewise (though they were completely undocumented). These last three constants can likely just be deleted as nothing references them (even to set useless bits). RB_ASKNAME doesn't actually survive reboot, however, so needs to be communicated to the bootloader via other means. If the bootloader sets it, though, it will be honored. Modified: head/lib/libc/sys/reboot.2 head/sys/sys/reboot.h Modified: head/lib/libc/sys/reboot.2 ============================================================================== --- head/lib/libc/sys/reboot.2 Mon Jul 9 21:29:23 2018 (r336147) +++ head/lib/libc/sys/reboot.2 Tue Jul 10 00:01:14 2018 (r336148) @@ -28,7 +28,7 @@ .\" @(#)reboot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 24, 2017 +.Dd July 10, 2018 .Dt REBOOT 2 .Os .Sh NAME @@ -58,18 +58,13 @@ options, defined in the include file .In sys/reboot.h , to be passed to the new kernel or the new bootstrap and init programs. -.Bl -tag -width RB_INITNAMEA +.Bl -tag -width RB_POWERCYCLE .It Dv RB_AUTOBOOT The default, causing the system to reboot in its usual fashion. .It Dv RB_ASKNAME -Interpreted by the bootstrap program itself, causing it to -prompt on the console as to what file should be booted. -Normally, the system is booted from the file -.Dq Ar xx Ns No (0,0)kernel , -where -.Ar xx -is the default disk name, -without prompting for the file name. +Normally the system only prompts the user if the loader specified root +file system has an error. +This flag forces it to always prompt the user for the root partition. .It Dv RB_DFLTROOT Use the compiled in root device. Normally, the system uses the device from which it was booted @@ -96,13 +91,6 @@ driver implements this feature. After halting, the shutdown code will do what it can to turn off the power. This requires hardware support. -.It Dv RB_INITNAME -An option allowing the specification of an init program (see -.Xr init 8 ) -other than -.Pa /sbin/init -to be run when the system reboots. -This switch is not currently available. .It Dv RB_KDB Load the symbol table and enable a built-in debugger in the system. This option will have no useful function if the kernel is not configured Modified: head/sys/sys/reboot.h ============================================================================== --- head/sys/sys/reboot.h Mon Jul 9 21:29:23 2018 (r336147) +++ head/sys/sys/reboot.h Tue Jul 10 00:01:14 2018 (r336148) @@ -41,23 +41,23 @@ */ #define RB_AUTOBOOT 0 /* flags for system auto-booting itself */ -#define RB_ASKNAME 0x001 /* ask for file name to reboot from */ +#define RB_ASKNAME 0x001 /* force prompt of device of root filesystem */ #define RB_SINGLE 0x002 /* reboot to single user only */ #define RB_NOSYNC 0x004 /* dont sync before reboot */ #define RB_HALT 0x008 /* don't reboot, just halt */ -#define RB_INITNAME 0x010 /* name given for /etc/init (unused) */ +#define RB_INITNAME 0x010 /* Unused placeholder to specify init path */ #define RB_DFLTROOT 0x020 /* use compiled-in rootdev */ #define RB_KDB 0x040 /* give control to kernel debugger */ #define RB_RDONLY 0x080 /* mount root fs read-only */ #define RB_DUMP 0x100 /* dump kernel memory before reboot */ -#define RB_MINIROOT 0x200 /* mini-root present in memory at boot time */ +#define RB_MINIROOT 0x200 /* Unused placeholder */ #define RB_VERBOSE 0x800 /* print all potentially useful info */ #define RB_SERIAL 0x1000 /* use serial port as console */ #define RB_CDROM 0x2000 /* use cdrom as root */ #define RB_POWEROFF 0x4000 /* turn the power off if possible */ #define RB_GDB 0x8000 /* use GDB remote debugger instead of DDB */ #define RB_MUTE 0x10000 /* start up with the console muted */ -#define RB_SELFTEST 0x20000 /* don't complete the boot; do selftest */ +#define RB_SELFTEST 0x20000 /* unused placeholder */ #define RB_RESERVED1 0x40000 /* reserved for internal use of boot blocks */ #define RB_RESERVED2 0x80000 /* reserved for internal use of boot blocks */ #define RB_PAUSE 0x100000 /* pause after each output line during probe */