aboutsummaryrefslogtreecommitdiff
path: root/exec/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix references to startup in commentsSamuel Thibault2020-07-251-1/+1
|
* Fix build with -fno-commonSamuel Thibault2020-03-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which will be the default in gcc-10. * acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier. * boot/private.h (verbose): Likewise. * eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise. * eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise. * exec/priv.h (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, zeroblock, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, node_to_page_lock, generation_lock, next_generation, group_desc_image, global_pokel, modified_global_blocks, use_xattr_translator_records): Likewise. * hostmux/hostmux.h (hostmux_maptime): Likewise. * isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len, logical_block_size, sblock): Likewise. * libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise. * libnetfs/callbacks.h (_netfs_translator_callback1, _netfs_translator_callback2): Likewise. * libnetfs/priv.h (netfs_mtime): Likewise. * libpager/priv.h (_pager_class): Likewise. * libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook, trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook, trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook, trivfs_getroot_hook): Likewise. * lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses, lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner, lwip_group): Likewise. * lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class): Likewise. * nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/nfsd.h (mapped_time, authserver): Likewise. * pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.h (pci_shutdown_notify_class, arrange_shutdown_notification): Likewise. * pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class, fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise. * pflocal/sserver.h (sock_port_bucket): Likewise. * proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/term.h (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, inputq, rawq, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.h (usermux_maptime): Likewise. * utils/msgids.h (msgid_argp): Likewise. * libdiskfs/priv.h (_diskfs_mtime): Remove definition. * lwip/options.h (lwip_argp): Add prototype. * mach-defpager/priv.h (partitions): Name structure. (all_partitions): Add extern qualifier. * acpi/main.c (acpifs_maptime, fs): New variables. * exec/main.c (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, next_generation, group_desc_image, global_pokel, use_xattr_translator_records): Likewise. * isofs/main.c (host_name, mounted_on, logical_block_size, sblock): Likewise. * libpager/pager-create.c (_pager_class): Likewise. * lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class): Likewise. * mach-defpager/default_pager.c (all_partitions): Likewise. * nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/main.c (mapped_time, authserver): Likewise. * pci-arbiter/main.c (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise. * pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket, addrport_class, socketport_class, fsys_identity): Likewise. * proc/main.c (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/main.c (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime. * lwip/main.c: Include "options.h". (lwip_argp, netif_list): Remove declarations. (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group, fsys_identity, lwipcntl): New variables. * eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable. * hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime * libdiskfs/extra-version.c: Rename file to... * libdiskfs/priv.c: ... new file. (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak variables. * libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c. * libtrivfs/priv.c: New file. * libtrivfs/Makefile (OTHERSRCS): Add priv.c * libcons/extra-version.c: Rename file to... * libcons/priv.c: ... new file. * libcons/Makefile (SRCS): Replace extra-version.c with priv.c. Fix build with #
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-7/+7
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* exec: remove duplicate function callEsa Peuha2016-02-041-5/+0
| | | | | * exec/main.c (main) Remove second call to trivfs_startup from commit a5d384c.
* fix compiler warnings in hurd/execFlavio Cruz2015-12-291-1/+1
| | | | | | | exec: Fix compiler warnings. * exec/elfcore.c: Cast arguments to vm_address_t. * exec/main.c: Use %lu in asprintf.
* exec: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-271-19/+32
| | | | | | | | | | | | | | | | | libtrivfs contains two ways of managing more than one port class and bucket. There is the old way of using a statically allocated array with explicit length, and the new way with dynamically allocated vectors. Converting all users to the new way of handling multiple classes and/or buckets, we can simplify the code in libtrivfs. In many cases, the code will be simpler and more expressive for the user. This also fixes a mild bug. The classes and buckets given to `trivfs_startup' end up in the dynamic vectors too, making the object lookup code use the more complicated code path. * exec/main.c: Convert to dynamic classes and buckets.
* exec: add missing includeJustus Winter2015-09-231-0/+1
| | | | * exec/main.c: Include `argz.h'.
* startup: bind the startup server to /servers/startupJustus Winter2014-11-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, the Hurd (ab)used the fact that the startup server speaks all protocols on its message port. Any server that wished to register for shutdown notifications would use proc_getmsgport to get a port to the startup server. This hardcodes the PID of /hurd/startup, and does not allow one to point a server to ones own startup server (e.g. using remap). Bind the startup server to /servers/startup instead. Use this to contact the startup server. * exec/main.c (S_exec_init): Use /servers/startup. Fall back to the old method so that the system still boots when the node /servers/startup is missing. * hurd/paths.h (_SERVERS_STARTUP): New macro. * libdiskfs/boot-start.c (diskfs_S_fsys_init): Use /servers/startup. * libdiskfs/init-startup.c (_diskfs_init_completed): Likewise. * pfinet/main.c (arrange_shutdown_notification): Likewise. * startup/Makefile (OBJS): Add fsysServer.o. * startup/startup.c (demuxer): Handle the fsys protocol. (main): Bind to /servers/startup. (S_fsys_getroot): Implement fsys_getroot. Stub out the rest.
* exec: add proper argument parsing, add --device-master-portJustus Winter2014-09-291-13/+93
| | | | | | | | | | | | | | | | If the device master port is given, a boot-time exec server can print diagnostic messages earlier. * exec/main.c (opt_device_master): New variable. (OPT_DEVICE_MASTER_PORT): New macro. (options): New set of options. (parse_opt): New function. (trivfs_append_args): Likewise. (argp): Pull the argp definition out of main. (trivfs_runtime_argp): Set, so that we respond properly to fsysopts. (open_console): Pull the code out of S_exec_init and generalize it. (main): Call open_console if a device master port is given. (S_exec_init): Call open_console.
* exec: add missing includesJustus Winter2014-05-261-0/+1
| | | | | * exec/exec.c: Include mach/gnumach.h. * exec/main.c: Include device/device.h.
* exec: connect std{in,out,err} to the mach consoleJustus Winter2014-02-021-2/+15
| | | | | * exec/main.c (S_exec_init): Get the device master port and connect std{in,out,err} to the mach console.
* exec: include the mig-generated server headers in main.cJustus Winter2014-01-201-3/+3
| | | | | | | | | GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * exec/main.c: Include the mig-generated server headers.
* exec: improve the exec_demuxer functionJustus Winter2013-12-021-6/+15
| | | | | | | | | | | | | | Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection "Handling Multiple Request Types". This avoids initializing the reply message in every X_server function. The reply message has already been properly initialized in libports, so there is no need to call mig_reply_setup. Furthermore, move the exec_startup_server_routine to the end of the chain, as the startup related functions are only needed at system bootstrap time. * exec/main.c (exec_demuxer): Improve the demuxer function.
* exec: Remove the remaining BFD related bitsJustus Winter2013-11-011-19/+0
| | | | | | * exec/Makefile: Remove commented out lines related to BFD. * exec/hostarch.c: Remove all BFD related code. * exec/main.c: Likewise.
* Define and use symbolic names for important processesJustus Winter2013-08-281-1/+2
| | | | | | | | | | | * include/pids.h: New file. * init/init.c (frob_kernel_process): Use symbolic name for kernel process. * exec/exec.c (S_exec_init): Use symbolic name for startup process. * libdiskfs/boot-start.c (diskfs_S_fsys_init): Likewise. * libdiskfs/init-startup.c (_diskfs_init_completed): Likewise. * pfinet/main.c (arrange_shutdown_notification): Likewise. * proc/mgt.c (create_startup_proc): Likewise. * proc/main.c (main): Use symbolic name for proc process.
* 2002-04-27 Roland McGrath <roland@frob.com>Roland McGrath2002-04-271-2/+3
| | | | | | * priv.h: Include <link.h> to get ElfW macro. * priv.h, exec.c, main.c, hostarch.c: Use `ElfW(TYPE)' in place of `Elf32_TYPE' throughout.
* 2001-04-01 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-06-161-4/+5
| | | | * main.c (S_exec_init): Use iohelp_create_empty_iouser.
* auth/Marcus Brinkmann2001-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * auth.c (main): New variable ARGP defining a doc string. Pass address of ARGP to argp_parse(). exec/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * main.c: Change hurd version name from proc to exec. (main): Add period to doc string. ftpfs/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * ftpfs.c: Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. hostmux/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * hostmux.c: Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. usermux/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * usermux.c (options): Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. trans/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * fifo.c: Make version string say `fifo', not `null'. Add period to doc text in ARGP. * firmlink.c: Add period to doc text in ARGP_DOC, convert semi-colon to colon. * magic.c (options): Add period to DOC. * new-fifo.c (fifo_trans_parse_args): Add doc string to ARGP. Include <version.h>, new global variable ARGP_PROGRAM_VERSION. * crash.c: Include <version.h>, add global variable ARGP_PROGRAM_VERSION. * hello.c: Include <version.h>, add global variable ARGP_PROGRAM_VERSION. (hello_argp): Add doc string. * hello-mt.c: Likewise. * streamio.c: Add period to DOC. Change streamdev to streamio in version string. * password.c (main): Add period to doc string in ARGP.
* 2000-03-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath2000-03-201-5/+4
| | | | | | * main.c (trivfs_allow_open): Initialize to zero. (trivfs_support_read, trivfs_support_write): Likewise. (trivfs_support_exec): Variable removed.
* 2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell2000-03-171-3/+6
| | | | * main.c (S_exec_init): Don't use MOVE_SEND in Hurd RPC.
* 1999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-07-101-5/+1
| | | | | | | | | | * exec.c (check_elf): Call elf_machine_matches_host instead of comparing against elf_machine. (load_section): #if 0 out no-op code that uses elf_machine. * priv.h (elf_machine_matches_host): Declare it. (elf_machine, mach_host_elf_machine): Remove decls. * main.c (main) [!BFD]: Don't call mach_host_elf_machine. (elf_machine): Variable removed.
* 1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-031-11/+5
| | | | | | | | | | | | | | | * core.c (core_dump_task): Use munmap instead of vm_deallocate, when it's from our own task. * elfcore.c: Likewise. * exec.c (load_section): Likewise. (map): Likewise. (close_exec_stream): Likewise. (finish_mapping): Likewise. (load): Likewise. (do_exec): Likewise. (S_exec_setexecdata): Likewise. * hashexec.c (check_hashbang): Likewise. * main.c (deadboot): Likewise.
* 1998-12-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-12-301-0/+1
| | | | * main.c (S_exec_init): Deallocate PROCSERVER port when finished.
* 1998-12-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-12-271-48/+19
| | | | | | | | | | | * main.c (S_exec_init): Remove variable DEV_MASTER; pass null instead since we don't need it. Use assert_perror on getting the host-priv port and on startup_essential_task, since init will hang until we've done made that RPC. 1998-12-21 Roland McGrath <roland@baalperazim.frob.com> * main.c (S_exec_init): Don't call set_active_trans. (set_active_trans): Function removed.
* 1998-11-25 Mark Kettenis <kettenis@phys.uva.nl>Roland McGrath1998-11-291-2/+2
| | | | | * main.c (S_exec_init): Call _hurd_proc_init with new args set to zero.
* Wed Aug 20 14:02:11 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1997-08-201-2/+1
| | | | | * main.c (main): New args for ports_manage_port_operations_multithread.
* (main):Miles Bader1997-06-301-14/+20
| | | | | | | Arg parsing added. (argp_program_version): New variable. Include <argp.h>.
* Mon Nov 18 17:45:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-181-1/+3
| | | | | | | | | | | | * exec.c (load_section): If ANYWHERE, then make sure ADDR starts out at least past the first page, so that we don't take it. Then the library can (if desired) make the page no-access. Fri Nov 15 17:34:23 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * exec.c: Don't include <hurd/shared.h> any more. * main.c (S_exec_init): New arg syntax of trivfs_open.
* *** empty log message ***Thomas Bushnell1996-09-051-3/+2
|
* *** empty log message ***Thomas Bushnell1996-08-291-6/+9
|
* (exec_version): Upgrade to 0.0.Michael I. Bushnell1996-05-061-2/+2
|
* (going_down): Variable removed.Roland McGrath1995-11-211-15/+18
| | | | | | (deadboot): Don't test it. Instead, use ports calls to check if there are no other live ports. (trivfs_goaway): Don't set it.
* (main): Add FLAGS arg to trivfs_startup call.Miles Bader1995-11-061-1/+1
|
* (exec_demuxer): Call exec_startup_server.Roland McGrath1995-10-251-1/+4
|
* Initial revisionRoland McGrath1995-10-111-0/+282