aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/opts-std-startup.c
Commit message (Collapse)AuthorAgeFilesLines
* libdiskfs: Add relatime supportRyan Jeffrey2020-09-301-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | * doc/hurd.texi (diskfs_set_node_atime): Document relatime behavior. * libdiskfs/diskfs.h (diskfs_set_node_atime): Likewise. * libdiskfs/init-init.c (_diskfs_relatime): Add variable. * libdiskfs/file-statfs.c (ST_RELATIME): Define if not defined already. (diskfs_S_file_statfs): Report ST_RELATIME when _diskfs_relatime is set. * libdiskfs/node-times.c (atime_should_update): New function. (diskfs_set_node_atime): Document relatime behavior. Call atime_should_update instead of reading _diskfs_noatime. * libdiskfs/opts-common.c (diskfs_common_options): Add --strictatime and -R/--relatime options. * libdiskfs/opts-std-runtime.c (struct parse_hook): Add relatime field. (set_opts): Set _diskfs_relatime from relatime field. (parse_opt): Parse -R option. * libdiskfs/opts-std-startup.c (parse_startup_opt): Parse -R option. * libdiskfs/priv.h (_diskfs_relatime): Declare variable. (atime_should_update): Declare function. * libdiskfs/opts-append-std.c (diskfs_append_std_options): Add reporting --relatime option. * libdiskfs/conch-fetch.c (iohelp_fetch_shared_data): Call atime_should_update instead of reading _diskfs_noatime. * libdiskfs/rdwr-internal.c (_diskfs_rdwr_internal): Likewise.
* Pass the kernel's task port to proc.Justus Winter2017-03-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the early server bootstrap relied upon a specific task layout to determine the kernels task port. Explicitly pass it from the kernel instead. * boot/boot.c (default_boot_script): Add '--kernel-task' parameter to ext2fs. (main): New bootscript variable 'kernel-task'. * libdiskfs/boot-start.c (diskfs_kernel_task): Declaration variable. (diskfs_start_bootstrap): If '--kernel-task' was given to us, pass it along to startup. * libdiskfs/opts-std-startup.c (diskfs_kernel_task): New variable. (startup_options): Add '--kernel-task' option. (parse_startup_opt): Handle option. * proc/main.c (kernel_task): New variable. (OPT_KERNEL_TASK): New macro. (options): New variable. (parse_opt): New function. (main): Parse options. Use 'kernel_task' if provided. * release/servers.boot: Add '--kernel-task' parameter to ext2fs. * startup/startup.c (OPT_KERNEL_TASK): New macro. (options): Add '--kernel-task' option. (kernel_task): New variable. (insert_ports_fnc_t): New declaration. (run): Add argument for a function that inserts rights into the newly created task and adds arguments to the argument vector. (argz_task_insert_right): New function. (proc_insert_ports): Likewise. (parse_opt): New function. (main): Pass the kernel's task port to proc. (frob_kernel_process): Use the kernel's task port.
* startup: rename /hurd/init to /hurd/startupJustus Winter2014-11-211-1/+1
| | | | | | | | | | | | | This patch series splits /hurd/init into two programs. As a first step, this patch renames /hurd/init to /hurd/startup. It is called startup because it speaks the startup protocol. * startup: Rename init to startup. Adjust accordingly. * Makefile (prog-subdirs): Likewise. * doc/hurd.texi (Server Bootstrap): Likewise. * hurd/paths.h (_HURD_STARTUP): Likewise. * libdiskfs/boot-start.c (diskfs_boot_init_program): Likewise. * libdiskfs/opts-std-startup.c (startup_options): Likewise.
* 2007-04-04 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2007-04-041-3/+5
| | | | | | * opts-std-startup.c (parse_startup_opt) <_diskfs_no_inherit_dir_group>: Swap the options into the correct order. Reported by Olaf Buddenhagen <olafbuddenhagen@gmx.net>.
* 2002-04-30 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-05-011-0/+2
| | | | | | | | | | | | | | | | | | * priv.h: Add OPT_NO_INHERIT_DIR_GROUP and OPT_INHERIT_DIR_GROUP. (_diskfs_no_inherit_dir_group): New declaration. * node-create.c (_diskfs_no_inherit_dir_group): New variable. (diskfs_create_node): Implement SysV group behaviour. * opts-common.c (diskfs_common_options): Add --no-inherit-dir-group (--nogrpdir, --sysvgroups) and --inherit-dir-group (--grpdir, --bsdgroups). * opts-append-std.c (diskfs_append_std_options): Add --no-inherit-dir-group if set. * opts-std-startup.c (parse_startup_opt): Add toggle for _diskfs_no_inherit_dir_group. * opts-std-runtime.c (struct parse_hook): Add noinheritdirgroup. (set_opts): Handle H->noinheritdirgroup. (parse_opt): Initialize H->noinheritdirgroup. Handle OPT_NO_INHERIT_DIR_GROUP and OPT_INHERIT_DIR_GROUP.
* 2001-08-22 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-08-241-1/+2
| | | | | | * opts-std-startup.c (startup_options): New compatibility option: bootflags, a hidden alias to multiboot-command-line. (parse_startup_opt): Bug fix.
* 2001-08-20 Roland McGrath <roland@frob.com>Roland McGrath2001-08-201-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | * opts-std-startup.c: diskfs_boot_flags -> diskfs_boot_command_line. (OPT_BOOT_CMDLINE): Renamed from OPT_BOOTFLAGS. (startup_options): --bootflags -> --multiboot-command-line (parse_startup_opt): Parse it. * diskfs.h: diskfs_boot_flags -> diskfs_boot_command_line. (diskfs_boot_filesystem): New macro. * init-main.c (diskfs_init_main): Use it. * init-init.c (diskfs_init_diskfs): Likewise. * console.c (diskfs_console_stdio): Likewise. * boot-start.c (_diskfs_boot_privports): Likewise. (diskfs_start_bootstrap): Split boot_command_line into words and pass those arguments to init instead of diskfs_bootflags. * opts-std-startup.c (_diskfs_boot_pause): New variable. (OPT_BOOT_PAUSE): New macro. (startup_options): Add --boot-debug-pause. (parse_startup_opt): Parse it. * boot-start.c (diskfs_boot_init_program): New variable. * diskfs.h: Declare it. * boot-start.c (default_init): Variable removed. (diskfs_start_bootstrap): Use diskfs_boot_init_program instead of default_init or prompting under -i. * opts-std-startup.c (OPT_BOOT_INIT_PROGRAM): New macro. (startup_options): Add --boot-init-program. (parse_startup_opt): Parse it.
* 1999-10-14 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-10-141-1/+1
| | | | | * opts-std-startup.c (TOGGLE): Fix `off' case. Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>.
* 1999-09-19 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-09-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | * node-times.c (diskfs_set_node_times): If _diskfs_noatime is set and neither NP->dn_set_mtime nor NP->dn_set_ctime is set, clear NP->dn_set_atime. Short-circuit return if none of dn_set_?time set. * opts-common.c (diskfs_common_options): Include "priv.h". Add aliases --ro/--rw for -r/-w. Add alias --nosuid for --no-suid, --noexec for --no-exec. Move --suid-ok, --exec-ok here from ... * opts-std-runtime.c (std_runtime_options): ... here. (struct parse_hook): New member `noatime'. (set_opts): Use H->noatime to set _diskfs_noatime. (parse_opt): Grok -A and OPT_ATIME to set/clear H->noatime. (OPT_ATIME): New macro. (OPT_SUID_OK, OPT_EXEC_OK): Moved to ... * priv.h: ... here. (diskfs_common_options): Add const to decl. * opts-std-startup.c (parse_startup_opt): Grok OPT_SUID_OK, OPT_EXEC_OK, -A, and OPT_ATIME. * init-init.c (_diskfs_noatime): New variable. (_diskfs_nosuid, _diskfs_noexec): Use uninitialized defns. * opts-append-std.c (diskfs_append_std_options): Add --no-atime if _diskfs_noatime is set.
* 1998-12-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-12-271-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | * opts-std-startup.c (startup_options): Move -C above "Boot options:", give it a docstring. Docstrings for --bootflags, --boot-command. (_diskfs_boot_command): New variable. (startup_options, parse_startup_opt): New option --boot-command, consumes remaining args to set _diskfs_boot_command. * priv.h: Declare _diskfs_boot_command. * boot-start.c (diskfs_start_bootstrap): If diskfs_exec_server_task is null, assume we are running as the boot command and have a root with /servers/exec. If _diskfs_boot_command is set, start that command in place of init. If can't lookup initname, print error msg and loop to prompt. Put a newline before "Init name" prompt. After starting exec server, try to set active trans on /servers/exec. (diskfs_boot_getpriv): New function: if _hurd_host_priv is null, use fsys_getpriv on our bootstrap port. (parent_task): New static variable, set there with fsys_getpriv call. (diskfs_S_fsys_init): If diskfs_exec_server_task is null, don't do anything with it; instead register parent_task as our child and send an fsys_init to our parent on our bootstrap port. * console.c (diskfs_console_stdio): Call diskfs_boot_privports before get_privileged_ports if diskfs_boot_flags is set.
* 1998-04-04 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-10-241-1/+6
| | | | | | | | | | | | | | Add support for a "virtual root directory" specified at startup. * priv.h (_diskfs_chroot_directory): Declare new variable. * opts-std-startup.c (startup_options, parse_startup_opt): New string-valued option -C/--directory/--virtual-root/--chroot sets _diskfs_chroot_directory. * init-startup.c (_diskfs_chroot_directory): New variable. (diskfs_startup_diskfs): If that's set, look up the name and warp us to that as a virtual root directory. * fsys-getroot.c (diskfs_S_fsys_getroot): Initialize new peropen's shadow_root_parent to null, and shadow_root to either null or, if _diskfs_chroot_directory is set, to diskfs_root_node.
* (parse_startup_opt):Miles Bader1997-09-191-2/+2
| | | | Prepend "_diskfs" to uses of NOSUID & NOEXEC.
* Tue Sep 16 14:37:51 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1997-09-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | * priv.h (nosuid, noexec): New variables. * init-init.c (nosuid, noexec): New variables, initialized to zero. * file-exec.c (diskfs_S_file_exec): If noexec is on, then prohibit all execution with EACCES. If nosuid is on, then prohibit setuid or setgid execution by silently omitting the uid substitution. * opts-std-startup.c (parse_startup_opt): Implement --no-suid and --no-exec. * opts-common.c (diskfs_common_options): Add --no-suid and --no-exec. * opts-std-runtime.c (struct parse_hook): Add nosuid and noexec. (parse_opt) [cases 'S', 'E', OPT_SUID_OK, OPT_EXEC_OK] Understand --no-suid, --no-exec, --suid-ok, and --exec-ok. (parse_opt) [case ARGP_KEY_INIT]: Initialize H->nosuid and H->noexec. (OPT_SUID_OK, OPT_EXEC_OK): New macros. (std_runtime_options): Add --suid-ok and --exec-ok. (set_opts): Set nosuid and noexec from H->nosuid and H->noexec. * opts-common.c (diskfs_common_options): Rename --nosync to --no-sync; leave --nosync as an alias.
* (store_argp_children, startup_argp_children):Miles Bader1996-10-241-6/+6
| | | | | | | | | | New variables. (diskfs_store_startup_argp): Use STORE_ARGP_CHILDREN instead of STORE_ARGP_PARENTS. (store_argp_parents, startup_argp_children): Variable removed. (diskfs_startup_argp): Use STARTUP_ARGP_CHILDREN instead of STARTUP_ARGP_PARENTS.
* (store_argp_parents):Miles Bader1996-09-231-35/+19
| | | | | | | | | | | | | Use diskfs_startup_argp, not diskfs_std_startup_argp. (diskfs_use_mach_device, diskfs_device_arg, dev_startup_options, dev_startup_argp_parents, diskfs_std_device_startup_argp): Variables removed. (diskfs_startup_argp): Renamed from diskfs_std_startup_argp. (parse_dev_startup_opt): Function removed. <hurd/store.h>: New include.
* (startup_options, parse_startup_opt): Remove the --version option, which isMiles Bader1996-07-201-6/+0
| | | | handled elsewhere now.
* (parse_dev_startup_opt): Use argp_error.Miles Bader1996-06-201-9/+11
| | | | | | (diskfs_std_startup_argp): Renamed from startup_argp, exported. (diskfs_std_device_startup_argp): Renamed from dev_startup_argp, exported. (diskfs_startup_arg, diskfs_device_startup_arg): Variable removed.
* (parse_dev_startup_opt, parse_startup_opt):Miles Bader1996-05-111-2/+3
| | | | Use ARGP_ERR_UNKNOWN instead of EINVAL.
* (startup_options, dev_startup_options, dev_start_argp_parents,Miles Bader1996-02-071-10/+10
| | | | | | dev_startup_argp, startup_common_argp, startup_argp_parents, startup_argp, diskfs_startup_argp): Make const.
* (startup_options): Put boot options in a separate group with a header.Miles Bader1996-01-231-1/+2
|
* (startup_options): Remove options common to both runtime and startup.Miles Bader1995-10-191-11/+7
| | | | | (startup_common_argp, startup_argp_parents): New variables. (startup_argp): Include parents.
* (std_startup_options): Renamed from std_long_options; converted to argp format.Miles Bader1995-10-131-22/+76
| | | | | | | | | | (std_startup_arg): Renamed from std_startp_argp, converted argp fmt. (diskfs_standard_startup_argp): Renamed from diskfs_standard_startup_options. (parse_startup_opt): Set DISKFS_ARGV. (diskfs_use_mach_device, diskfs_device_arg, dev_startup_options, dev_startup_argp_parents, dev_startup_argp, diskfs_device_startup_argp): New variables. (parse_dev_startup_opt): New function.
* (OPT_BOOTFLAGS, OPT_EXEC_SERVER_TASK, OPT_HOST_PRIV_PORT,Miles Bader1995-10-071-0/+26
| | | | | | OPT_DEVICE_MASTER_PORT): New defines. (std_long_opts, parse_std_startup_opt): Add the --device-master-port, --host-priv-port, --exec-server-task, and --bootflags options.
* Initial revisionMiles Bader1995-05-201-0/+77