summaryrefslogtreecommitdiff
path: root/hurd
AgeCommit message (Collapse)Author
2021-04-03acpi: Add new RPCsacpica-integrateDamien Zammit
2021-03-19fsys_init: Document that the proc port is for the task itselfSamuel Thibault
2021-03-13Document fsys_getpriv and fsys_init RPCsSamuel Thibault
2020-12-28Bump interface versionSamuel Thibault
* hurd/version.h (HURD_INTERFACE_VERSION): Bump to 20201227.
2020-12-27Add proc_waitidSamuel Thibault
proc_wait assumes that the caller always wants WEXITED, but waitid() does not. The new proc_waitid RPC requires the caller to specify at least one of WEXITED, WSTOPPED, or WCONTINUED. * hurd/process.defs (proc_waitid): New RPC. * hurd/process_reply.defs (proc_waitid): New RPC. * hurd/process_request.defs (proc_waitid): New RPC. * proc/proc.h (struct proc): Add p_continued field. * proc/wait.c (WCONTINUED, WEXITED): Define if not already defined. (S_proc_wait): Rename implementation to S_proc_waitid, and modify to stop assuming WEXITED. Add support for WCONTINUED. (S_proc_wait): Reimplement by just calling S_proc_waitid with an additional WEXITED. (proc_mark_stop): Clear p_continued. (proc_mark_cont): Set p_continued, clear p_waited, wake any waiting parent.
2020-11-30hurd_types: Add const_string_t typeSamuel Thibault
This will allow to relieve constraints in callers, e.g. dir_lookup("") would otherwise produce a warning with gcc-11 since char[1024] would mean that dir_lookup would read all 1024 characters while it is not. * hurd/hurd_types.h (const_string_t): New type.
2019-10-29fs: Support for file record lockingSvante Signell
2019-02-01 Svante Signell <svante.signell@gmail.com> * Update copyright years. 2018-01-05 Svante Signell <svante.signell@gmail.com> * Update copyright years. * fs.defs: Add new argument rendezvous: mach_port_send_t to RPC file_record_lock. 2017-01-05 Svante Signell <svante.signell@gmail.com> * Update copyright years and headers. 2016-05-23 Svante Signell <svante.signell@gmail.com> * fs.defs: Added description. * hurd_types.defs: Make struct flock_t seven integers long since l_start and l_len are 64bit. * hurd_types.h: typedef flock_t as flock64. 2001-04-10 Neal H Walfield <neal@cs.uml.edu> * fs.defs: New RPC file_record_lock. * hurd_types.defs: Import <fcntl.h>.
2019-07-27diskfs.h: Expose 64bit typesSamuel Thibault
We build hurd with LFS64, so we should always expose LFS64 types, so callers do not have to build with -D_FILE_OFFSET_BITS=64. * libdiskfs/diskfs.h (struct peropen): Make `filepointer' field type `loff_t' instead of `off_t'. (diskfs_cached_ifind): Make `inum' parameter `ino64_t' instead of `ino_t'. (diskfs_cached_lookup_context): Likewise. * hurd/shared.h (strcut shared_io): Make `read_size', `prenotify_size', `postnotify_size', `readnotify_size', `rd_file_pointer', `wr_file_pointer', `xx_file_pointer', `file_size' fields type `loff_t' instead of `off_t'.
2019-03-03shutdown: rename shutdown RPC to shutdown_shutdownSamuel Thibault
For coherency with usage, and to avoid conflicting with shutdown(2) * hurd/shutdown.defs (shutdown): Rename to shutdown_shutdown. * shutdown/shutdown.c (S_shutdown): Rename to S_shutdown_shutdown. * startup/startup.c (do_shutdown): Call shutdown_shutdown instead of shutdown.
2019-03-02Add shutdown RPC && ACPI specific disappear routineDamien Zammit
* Makefile (prog-subdirs): Add shutdown. * hurd/hurd_types.defs (shutdown_t): New type. * hurd/hurd_types.h (shutdown_t): New type. * hurd/shutdown.defs: New file. * shutdown: New directory.
2019-03-02ACPI tables translatorDamien Zammit
Exposes x86 ACPI tables as a netfs on a mount point * acpi: New directory. * Makefile (prog-subdirs): Add acpi. * hurd/hurd_types.h (FSTYPE_ACPI): New macro.
2018-10-30PCI ArbiterJoan Lledó
2018-04-22Fix DESTDIR supportSamuel Thibault
Adding $(DESTDIR) to paths in config.make.in brings redundant additions when e.g. datarootdir is "${datadir}". The viable way is to just fix the installation rules. * Makeconf (install, install-headers): Prepend $(DESTDIR) to dependencies. ($(DESTDIR)$(installationdir)): New rule. ($(addprefix $(installationdir)/,$(installable))): Prepend $(DESTDIR). ($($(includedir)/$(installhdrsubdir))): Likewise. ($(addprefix $(libdir)/$(libname),_p.a .a _pic.a)): Likewise. ($(libdir)/$(libname).so.$(hurd-version)): Likewise. ($(libdir)/$(libname).so): Likewise. ($(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs))): Likewise. ($(installationdirlist)): Likewise. * config.make.in (hurddir, libdir, bindir, sbindir, includedir, libexecdir, bootdir, infodir, sysconfdir, localstatedir, sharedstatedir, datadir, datarootdir): Remove $(DESTDIR). * config/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(sysconfdir)/login): Prepend $(DESTDIR). ($(installed_logins)): Likewise. ($(installed_conf)): Likewise. * console-client/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(module-dir)): Prepend $(DESTDIR). ($(module-dir)/%): Likewise. ($(XKB_BASE)): Likewise. ($(XKB_BASE)/%): Likewise. * hurd/Makefile (install-headers, install-msgids): Prepend $(DESTDIR) to dependencies. ($(includedir)/hurd/%): Prepend $(DESTDIR). ($(datadir)/msgids, $(includedir)/hurd): Prepend $(DESTDIR). * include/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(includedir)/%): Prepend $(DESTDIR). * libstore/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(store-types:%=$(libdir)/libstore_%.a): Prepend $(DESTDIR). * sutils/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(prefix)/dev/MAKEDEV): Prepent $(DESTDIR). ($(prefix)/dev): Likewise.
2018-03-05Add file_utimens RPC to use a struct timespecFlávio Cruz
and update the servers to use UTIME_NOW and UTIME_OMIT. * console-client/trans.c (netfs_attempt_utimes): Do not set current time ourself. * console/console.c (netfs_attempt_utimes): Likewise. * ftpfs/netfs.c (netfs_attempt_utimes): Likewise. * hostmux/node.c (netfs_attempt_utimes): Likewise. * usermux/node.c (netfs_attempt_utimes): Likewise. * nfs/ops.c (netfs_attempt_utimes): Likewise. * doc/hurd.texi (file_utimens): Add documentation. * hurd/fs.defs (file_utimens): Add RPC. * libdiskfs/file-utimes.c (diskfs_S_file_utimes): Move implementation and replace with translation layer with... (diskfs_S_file_utimens): ... new function. * libnetfs/file-utimes.c (netfs_S_file_utimes): Likewise with... (netfs_S_file_utimens): ... new function. * libnetfs/init-init.c: Include <error.h>. (netfs_mtime): New variable. (netfs_init): New function. * libnetfs/netfs.h (netfs_attempt_utimes): Update documentation. * libnetfs/priv.h (netfs_mtime): Declare variable. * libtreefs/s-file.c (treefs_S_file_utimes): Convert time values and call treefs_s_file_utimens instead of treefs_s_file_utimes. * libtreefs/treefs-hooks.h: Replace TREEFS_HOOK_S_FILE_UTIMES with TREEFS_HOOK_S_FILE_UTIMENS. * libtreefs/treefs-s-hooks.h: Replace s_file_utimes with s_file_utimens. * libtrivfs/file-utimes.c (trivfs_S_file_utimens): New function. * libtrivfs/times.c (trivfs_set_atime): Try to use file_utimens before using file_utimes. (trivfs_set_mtime): Likewise. * nfsd/ops.c (complete_setattr): Likewise. * trans/fakeroot.c (netfs_attempt_utimes): Likewise. * nfs/nfs.c (xdr_encode_sattr_times): Do not set atime or mtime when they are NULL. * configure.ac: Look for file_futimens, and define UTIME_NOW/OMIT, for compatibility with old glibcs.
2018-03-04Avoid using loff_tSamuel Thibault
It may not be available depending on standard selection. * hurd/hurd_types.h (off_array_t, const_off_array_t): Use __loff_t instead of loff_t.
2018-01-28Add const MIG typesSamuel Thibault
* hurd/default_pager_types.h (const_recnum_array_t, const_vm_size_array_t): New types. * hurd/hurd_types.h (const_data_t, const_intarray_t, const_fd_mask_t, const_portarray_t, const_pidarray_t, const_idarray_t, const_off_array_t, *const_procinfo_t): New types.
2018-01-08Implement /proc/<pid>/exeSamuel Thibault
by adding proc_set/get_exe to the proc server, making exec call proc_set_exe, and libps call proc_get_exe. procfs can then just retrieve the information to make the "exe" symlink. * hurd/process.defs (proc_set_exe, proc_get_exe): New RPCs. * hurd/process_request.defs: Likewise. * hurd/process_reply.defs: Add skips for proc_set_exe and proc_get_exe RPCs. * proc/proc.h (struct proc): Add `exe' field. * proc/info.c (S_proc_set_exe, S_proc_get_exe): New functions. * proc/mgt.c (process_has_exited): Free p->exe. (S_proc_child): Duplicate parent `exe' into child's `exe'. * exec/exec.c (do_exec): Call proc_set_exe when a filename is available. * libps/ps.h (struct proc_stat): Add `exe_vm_alloced', `exe', and `exe_len' field. (PSTAT_EXE): New macro. (PSTAT_USER_BASE): Change value to make room. (proc_stat_exe, proc_stat_exe_len): New macros. * libps/procstat.c (proc_stat_set_flags): Handle PSTAT_EXE case by calling proc_get_exe. * libps/spec.c (ps_get_exe): New function. (ps_exe_getter): New structure. (ps_fmt_spec): Add "Exe" specification. * procfs/process.c (process_file_symlink_make_node, process_file_gc_exe): New functions. (procfs_dir_entry): Add "exe" entry. * startup/startup.c (launch_core_servers): Set exe paths for startup, auth, proc, and fs servers. (frob_kernel_process): Set exe path for kernel task. (S_startup_essential_task): Set exe path for exec server.
2018-01-08Add a file_exec_file_name RPCEmilio Pozuelo Monfort
* hurd/fs.defs (file_exec): Deprecate in favor of... (file_exec_paths): ...this new RPC. * TODO: Update. * doc/hurd.texi: Update RPC name. * hurd/hurd_types.h: Update RPC name. * libdiskfs/boot-start.c: Update RPC name. * configure.ac: Check for presence of RPC stubs file_exec_paths exec_exec_paths. * exec/hashexec.c (check_hashbang): When file_exec_paths is available, use it instead of file_exec. * startup/startup.c (run, run_for_real, start_child): Likewise. * utils/login.c (main): Likewise. * libfshelp/start-translator-long.c (fshelp_start_translator_long): Likewise. * libdiskfs/file-exec.c (diskfs_S_file_exec): Move code to new function diskfs_S_file_exec_paths and call it. (diskfs_S_file_exec_paths): New function, use exec_exec_paths when available instead of exec_exec * libnetfs/file-exec.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise. * trans/fakeroot.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise. * libtrivfs/file-exec.c (trivfs_S_file_exec_paths): New function.
2018-01-08Add a new exec_exec_paths RPCEmilio Pozuelo Monfort
* hurd/exec.defs (exec_exec): Label as deprecated. (exec_exec_paths): New RPC. * doc/hurd.texi: Update accordingly. * exec/hashexec.c (check_hashbang): Add file_name_exec argument. Don't guess the file name if file_name_exec is set. * exec/priv.h (check_hashbang): Add path argument. * exec/exec.c (S_exec_exec): Label as deprecated. (S_exec_exec_paths): New function. (do_exec): Add path and abspath arguments, pass path to check_hashbang.
2017-12-11Record executable entry for PIE core dumpsSamuel Thibault
* hurd/process.defs (proc_set_entry, proc_get_entry): New RPCs. * hurd/process_reply.defs: Add skips for proc_set_entry, proc_get_entry. * hurd/process_request.defs: Likewise. * exec/exec.c (do_exec): Call proc_set_entry. * proc/proc.h (proc): Add p_entry field. * proc/mgt.c (S_proc_set_entry, S_proc_get_entry): New RPC implementations. * exec/elfcore.c (dump_core): Add at_entry note, call proc_get_entry to get it, and write it with WRITE_NOTE.
2017-12-11Reserve IDs for proc_set_exe and proc_get_exeSamuel Thibault
* hurd/process.defs: Reserve IDs for proc_set_exe and proc_get_exe * hurd/process_reply.defs: Likewise. * hurd/process_request.defs: Likewise.
2017-09-12Traverse translator hierarchies using the fsys protocol.Justus Winter
Previously, we used the fs protocol to traverse the translator hierarchies. This, however, is conceptually flawed, because translators are bound to nodes, and a node can have zero or more links in the file system. Therefore, the previous method of returning a list of paths to the client and expecting them to be able to follow these to reach the child translators was always unreliable. Fix this by using the fsys protocol to traverse the hierarchy, and returning the control ports of all children. This is more robust, and also conceptually cleaner, because the fsys protocol is about translator linkage, hence this is the point to implement traversal. Also move the get source routine over. A per-node source really does not fit the reality of most translators, while a per-translator source makes sense in many cases. * hurd/fs.defs (file_get_children): Drop routine. (file_get_source): Likewise. * hurd/fsys.defs (fsys_get_children): New routine. (fsys_get_source): Likewise. * libdiskfs/Makefile (FSYSSRCS): Remove files, add files. * libdiskfs/file-get-children.c: Remove file. * libdiskfs/fsys-get-children.c: New file. * libdiskfs/file-get-source.c: Remove file. * libdiskfs/fsys-get-source.c: New file. * libfshelp/fshelp.h (fshelp_filter): Remove type. (fshelp_get_active_translators): Remove filter and prefix argument, return list of control ports. * libfshelp/translator-list.c (fshelp_get_active_translators): Likewise. * libnetfs/Makefile (FSSRCS): Move 'get-source.c' too OTHERSRCS. (FSYSSRCS): Remove files, add files. * libnetfs/file-get-children.c: Remove file. * libnetfs/fsys-get-children.c: New file. * libnetfs/file-get-source.c: Remove file. * libnetfs/fsys-get-source.c: New file. * libtrivfs/Makefile: Move 'get-source.c' too OTHERSRCS. (FSYSSRCS): Remove files, add files. * libtrivfs/file-get-children.c: Remove file. * libtrivfs/fsys-get-children.c: New file. * libtrivfs/file-get-source.c: Remove file. * libtrivfs/fsys-get-source.c: Add file. * trans/Makefile (mtab): Build client stubs until the libc has caught on. * trans/mtab.c (target_control): New variable. (insecure): Drop variable. (all_translators): Likewise. (MAX_DEPTH): New macro. (max_depth): New variable. (options): Remove '--insecure' and '--all-translators', add '--depth'. (parse_opt): Adapt accordingly. (trivsfs_append_args): Likewise. (main): Get the control port of the target translator, then drop privileges. (is_filesystem_translator): Remove function. (mtab_mark_as_seen): Simplify. Just check if the control port is known. (mtab_populate): Limit depth of recursion, adapt to traversing over the control ports, simplify. (open_hook): Remove scary comment, it is not applicable anymore because we no longer dir_lookup child translators.
2017-06-05hurd: Fix the use of polymorphic types.Justus Winter
Fixes baf7e5c8ce176aead15c2559952d8bdf0da41ffd. * hurd/process.defs (proc_getmsgport): Make 'msgport' parameter polymorphic only on the sender side. (proc_task2proc): Likewise for 'proc'. (proc_pid2proc): Likewise.
2017-03-10hurd: Use polymorphic port types to return some rights.Justus Winter
Currently, the RPC definitions of two procedures of the process subsystem assume that the rights are created from a receive right. Similarly, 'proc_getmsgport' assumes that the right is to be copied. This needlessly limits the ability to relay the RPC in server code. This fixes this. The protocol is unchanged, only the generated server stubs assume an additional parameter for the type. * hurd/process.defs (proc_getmsgport): Make 'msgport' parameter polymorphic. (proc_task2proc): Make 'proc' parameter polymorphic. (proc_pid2proc): Likewise. * hurd/process_reply.defs (proc_getmsgport): Likewise. (proc_task2proc_reply): Likewise. (proc_pid2proc_reply): Likewise. * proc/info.c (S_proc_task2proc): Adapt server function. (S_proc_pid2proc): Likewise. * proc/msg.c (S_proc_getmsgport): Likewise.
2016-12-19procfs: provide magic retry response for /proc/selfJustus Winter
* hurd/hurd_types.h: Document the magic retry string `pid'. * hurd/paths.h (_HURD_MAGIC): New macro. * procfs/main.c: Remove all code related to faking /proc/self. * procfs/main.h: Likewise. * procfs/rootdir.c: Likewise. Instead, return the magic retry response `pid' for the `self' node.
2016-10-10Fix some RPC request headers #ifdef guardsSamuel Thibault
by fixing the subsystem name into containing _request. * hurd/auth_request.defs: Set subsystem name to auth_request. * hurd/io_request.defs: Set subsystem name to io_request. * hurd/process_request.defs: Set subsystem name to process_request.
2016-08-09trans/crash: core file name templatesJustus Winter
Add an option to specify a template used to construct core file names. This way core files can be collected at a predictable central location. * hurd/crash.defs (crash_dump_task): Return EEXIST if the core file has been written elsewhere. * trans/crash.c (corefile_template): New variable. (template_valid): New function. (template_make_file_name): Likewise. (S_crash_dump_task): Use the template to construct a name, open the file, and write the core dump there instead of the handle provided by the caller. (argp_option): New option. (doc): Document the format. (parse_opt): Handle new option (trivfs_append_args): Likewise.
2016-04-04Use posix types for mig definitions.Flavio Cruz
* hurd/hurd_types.defs: Use posix types. * libfshelp/start-translator-long.c: Use uint32_t instead of unsigned32_t.
2016-03-16Add getting swap information from swapon and procfsSamuel Thibault
* hurd/default_pager.defs (default_pager_storage_info): New RPC. * hurd/default_pager_reply.defs: Skip default_pager_storage_info RPC. * hurd/default_pager_types.h: Include <mach/machine/vm_types.h>. (vm_size_array_t): New type. * mach-defpager/priv.h (part): Add `name' field. * mach-defpager/default_pager.c (new_partition): Allocate and fill `part->name' field. Free it on error. (destroy_paging_partition): Free `part->name' field. (S_default_pager_storage_info): New function. * procfs/Makefile (SRCS): Add default_pagerUser.c. * procfs/rootdir.c: Include "default_pager_U.h". (rootdir_gc_swaps): New function. (rootdir_entries): Add "swaps" entry. * sutils/swapon.c: Include <argz.h> (show): New variable. (options): Add --show/-S option. (def_pager, dev_master): New variables (swaponoff): Move getting `def_pager' to... (get_def_pager): ... new function. (main): Support 'S' option. * trans/proxy-defpager.c (S_default_pager_storage_info): New function.
2016-03-13Add missing RPC definitionsSamuel Thibault
* hurd/process_request.defs (proc_make_task_namespace_request): New definition. * hurd/process_reply.defs (proc_make_task_namespace_reply): Skip definition.
2016-02-22fix Xioctl-proto.defs creationBartlomiej Puget
* hurd/Makefile (%.h): Remove heading spaces. (%ioctl-requests.list): Protect asterisk. * hurd/gensym.awk: Do not print newline in __asm statement.
2015-12-29fix compiler warnings in hurd/console-clientFlavio Cruz
console-client: Fix several compiler warnings. * console-client/bdf.c: Use size_t instead of int. * console-client/driver.c: Remove unused variable errstring. * console-client/pc-kbd.c: Cast sc to scancode_x1 before comparing with enum values. * console-client/vga-dynacolor.h: Use an explicit if in reference counting. * console-client/vga-dynafont.c: Use usigned char for bitmaps. * console-client/vga-support.c: Use unsigned char instead of char. * console-client/vga-support.h: Likewise. * console-client/vga.c: Use conchar_attr_equal instead of casting structures to integers. * hurd/console.h: Add conchar_attr_equal to compare conchar_attr_t structures.
2015-10-29hurd: fix type of in-translation functionJustus Winter
* hurd/hurd_types.defs (interrupt_t): Fix type of in-translation function.
2015-01-03misc: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-12-12hurd: make the protected payload changes less intrusiveJustus Winter
The changes to `hurd_types.defs' caused the glibc build to fail. Guard the problematic parts with `HURD_SERVER' similar how it is done in GNU Mach. * Makeconf: Define `HURD_SERVER' when preprocessing the RPC definitions for the server side. * hurd/hurd_types.defs: Guard problematic parts with `HURD_SERVER'.
2014-12-11Fix inclusion loop between hurd_types.defs and hurd/signal.h>Samuel Thibault
* boot/Makefile (MIGSFLAGS): Add -DHURD_DEFAULT_PAYLOAD_TO_PORT=1. * mach-defpager/Makefile (MIGSFLAGS): Likewise. * hurd/hurd_types.defs: Do not include <hurd/ports.h>.
2014-12-10hurd: add `proc_make_task_namespace'Justus Winter
Add a new RPC to the process protocol to create task namespaces. These can be used by an unprivileged process to claims the responsibility to manage all tasks in this namespace. Any task created in this namespace will automatically be declared a child of the root process, and a `mach_notify_new_task' message is sent to a given port. If the root process dies, the proc server will terminate all tasks in the namespace. * hurd/process.defs (proc_make_task_namespace): New RPC.
2014-12-07hurd: add intranpayload functions to all hurd typesJustus Winter
For each hurd type defined in hurd_types.h, add a intranpayload function. If an X_INTRAN mutation is defined for a type, a corresponding X_INTRAN_PAYLOAD has to be defined. If no X_INTRAN mutation is defined, use ports_payload_get_name as intranpayload function, turning the payload back into an port name. * hurd/hurd_types.defs: Add intranpayload functions. * hurd/term.defs: Likewise. * hurd/default_pager.defs: Include `hurd_types.defs' for `MACH_PAYLOAD_TO_PORT'.
2014-11-21startup: bind the startup server to /servers/startupJustus Winter
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.
2014-11-21startup: rename /hurd/init to /hurd/startupJustus Winter
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.
2014-11-21Add proc_set_init_task, make runsystem pid 1Justus Winter
* hurd/process.defs (proc_set_init_task): New procedure. * hurd/process_reply.defs (proc_set_init_task): Likewise. * hurd/process_request.defs (proc_set_init_task): Likewise. * include/pids.h: Add HURD_PID_INIT as 1, adjust others accordingly. * init/init.c (start_child): Register the child task. * proc/proc.h (init_proc): New variable. (create_startup_proc): Rename to create_init_proc. * proc/main.c (main): Create placeholder proc object for pid 1. * proc/mgt.c: Use init_proc instead of startup_proc, as the former is the new root of the process tree. (create_startup_proc): Rename to create_init_proc. (S_proc_set_init_task): New function. * doc/hurd.texi (Server Bootstrap): Update accordingly. * procfs/main.c: Do not hard-code kernel pid, use pids.h instead.
2014-09-22hurd: add symbolic name for the mtab translatorJustus Winter
* hurd/paths.h (_HURD_MTAB): New macro. * procfs/rootdir.c (rootdir_mounts_get_translator): Use the new macro. (rootdir_mounts_exists): Likewise.
2014-09-04hurd: make memory_object parameter polymorphicJustus Winter
Make the memory_object parameter of default_pager_object_create polymorphic. This fixes https://savannah.gnu.org/bugs/?26751 . * hurd/default_pager.defs (default_pager_object_create): Make memory_object parameter polymorphic. * mach-defpager/default_pager.c (S_default_pager_object_create): Adjust accordingly. * trans/proxy-defpager.c (S_default_pager_object_create): Likewise.
2014-08-31hurd: fix semantic of file_get_childrenJustus Winter
When first introduced as fsys_get_children, it made sense to return the list of children using paths relative to the root of the filesystem that was queried. Making the get_children method part of the fsys protocol was a mistake that has since been corrected in 9366d6b2. Instead of returning paths relative to the root of the translator, return paths relative to the path of the receiving node. This fixes a problem with the mtab translator. Previously, the mtab translator invoked on a target that was not the root directory of a translator would compute invalid paths, e.g.: /hurd/mtab: /any/path/servers/socket/26 No such file or directory * hurd/fs.defs (file_get_children): Update comment. * libfshelp/translator-list.c (fshelp_get_active_translators): Add argument PREFIX. Filter entries not beginning with PREFIX if non-NULL, and omit PREFIX from the returned paths. * libfshelp/fshelp.h (fshelp_get_active_translators): Update comment accordingly. Also clarify that both FILTER and PREFIX can be NULL. * libdiskfs/file-get-children.c (diskfs_S_file_get_children): Update comment, pass prefix to fshelp_get_active_translators. * libnetfs/file-get-children.c (netfs_S_file_get_children): Likewise.
2014-06-15hurd: fix receiver lookup in termctty_open_terminalJustus Winter
* hurd/hurd_types.h (ctty_t): New type definition. * hurd/term.defs (ctty_t): New type definition. * term/mig-decls.h: New file. * term/mig-mutate.h: Add mutators, includes. * term/term.h: Add include guards. * term/users.c (S_termctty_open_terminal): Fix receiver lookup. * boot/boot.c (S_termctty_open_terminal): Likewise.
2014-06-06hurd: fix type of optimal_transfer_sizeJustus Winter
* hurd/shared.h (struct shared_io): Use blksize_t for optimal_transfer_size.
2014-04-09hurd: add a new type interrupt_t for the interrupt protocolJustus Winter
* hurd/hurd_types.defs (interrupt_t): New type. * hurd/hurd_types.h (interrupt_t): Likewise. * hurd/interrupt.defs (interrupt_operation): Use the new type.
2014-04-05hurd: add a new type for the exec_startup protocolJustus Winter
* hurd/hurd_types.defs (exec_startup_t): New type. * hurd/hurd_types.h (exec_startup_t): Likewise. * hurd/exec_startup.defs: Honor EXEC_STARTUP_IMPORTS. (exec_startup_get_info): Use the new type as receiver.
2014-03-25hurd: fix receiver type, honor DEFAULT_PAGER_IMPORTSJustus Winter
* hurd/default_pager.defs: Honor DEFAULT_PAGER_IMPORTS. (default_pager_object_set_size): Fix receiver type.
2014-02-27hurd: add IIOCTL_IMPORTSJustus Winter
* hurd/iioctl.defs: Add IIOCTL_IMPORTS.