aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Document fsys_getpriv and fsys_init RPCsSamuel Thibault2021-03-131-1/+5
|
* pci-arbiter: Introduce machdev into this serverDamien Zammit2021-03-087-71/+229
| | | | | | | | | | | | | | | * pci-arbiter/Makefile Add machdev lib and simplify * pci-arbiter/main.c (pci_device_{open,close,shutdown}): New methods (netfs_server_func): Thread the demuxer loop (pcifs_startup): Custom startup method (main): Use machdev for server and detach worker threads * pci-arbiter/options.{c,h} Add disk-server-task and priv ports * pci-arbiter/startup-ops.c Delete file Message-Id: <20210308130457.693821-4-damien@zamaudio.com>
* acpi, pci-arbiter: Fix get_direntsDamien Zammit2021-03-082-23/+17
| | | | | | | | * acpi/netfs_impl.c (get_dirents): Fix computing number of elements to be returned. Simplify computing the data size. * pci-arbiter/netfs_impl.c (get_dirents): Likewise. (netfs_get_dirents): Fix passing max_data_len rather than max_entries a second time.
* libmachdev: pass shutdown handle to shutdown methodDamien Zammit2021-03-075-6/+6
| | | | | | | | | | | | * libmachdev/machdev-device_emul.h (struct machdev_device_emulation_ops): Add shutdown method. * libmachdev/ds_routines.c (machdev_device_shutdown): Take dosync_handle handle and pass it to shutdown method. * libmachdev/machdev.h (machdev_device_shutdown): Update prototype. * libmachdev/trivfs_server.c (S_startup_dosync): Pass shutdown handle to machdev_device_shutdown call. * rumpdisk/block-rump.c (rumpdisk_device_shutdown): Take dosync_handle parameter.
* pci-arbiter: Accept not having an underlying node.Damien Zammit2021-03-071-6/+12
| | | | | | * pci-arbiter/pcifs.c (underlying_stat): New variable. (init_file_system): When underlying_node is nul, use the underlying_stat content.
* TypoDamien Zammit2021-03-071-2/+2
| | | | * pci-arbiter/pci-ops.c: Fix typo in comment.
* rumpdisk: Let server threads runDamien Zammit2021-03-021-0/+2
| | | | | * rumpdisk/main.c (main): Call pthread_exit(NULL) to let server threads continue.
* libmachdev: Spawn a thread for server loop so main pathway can continueDamien Zammit2021-03-021-7/+23
| | | | Message-Id: <20210302114137.592230-3-damien@zamaudio.com>
* libnetfs: Fix mapping of time fallback to mach device 'time'Damien Zammit2021-02-021-0/+2
| | | | | | | | * libnetfs/init-init.c (netfs_init): Also call maptime_map with use_mach_dev set to 1 so libnetfs can be used before the root filesystem. Message-Id: <20210202072945.53483-2-damien@zamaudio.com>
* pfinet: fix a missed 'return' keyword.Guy-Fleury Iteriteka2021-01-231-0/+2
| | | | | | * pfinet/ethernet.c(ethernet_close): Add 'return 0;' at the end of function. Message-Id: <20210123221255.11791-2-gfleury@disroot.org>
* pfinet: fix missed include files.Guy-Fleury Iteriteka2021-01-231-1/+2
| | | | | | * pfinet/glue-include/linux/socket.h: include '<string.h>' for 'memcpy' and '<stdlib.h>' for 'abort'. Message-Id: <20210123221255.11791-1-gfleury@disroot.org>
* proc: Fix building with old glibcSamuel Thibault2020-12-291-0/+4
| | | | * proc/wait.c (WNOWAIT): Define if not already defined.
* proc: Fix WIFCONTINUEDSamuel Thibault2020-12-281-0/+1
| | | | * proc/wait.c (S_proc_mark_cont): Set p_status to __W_CONTINUED.
* proc: support waitid(WNOWAIT)Samuel Thibault2020-12-281-3/+9
| | | | | * proc/wait.c (S_proc_waitid): When options contains WNOWAIT, do not set p_waited or complete child death.
* Bump interface versionSamuel Thibault2020-12-281-1/+1
| | | | * hurd/version.h (HURD_INTERFACE_VERSION): Bump to 20201227.
* Add proc_waitidSamuel Thibault2020-12-275-11/+67
| | | | | | | | | | | | | | | | | | | 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.
* proc: Also send SIGCHLD on child restartSamuel Thibault2020-12-271-0/+5
| | | | | * proc/wait.c (S_proc_mark_cont): When parent has not set nostopcld, send a SIGCHLD with CLD_CONTINUED.
* proc: send signals with POSIX sigcodesJeremie Koenig2020-12-274-6/+7
| | | | | | | | * proc/stubs.c (send_signal): Add a sigcode argument. * proc/proc.h (send_signal): Declare the sigcode argument. * proc/pgrp.c (leave_pgrp): Specify a null sigcode. * proc/wait.c (alert_parent): Use CLD_EXITED for SIGCHLD on exit. (S_proc_mark_stop): Use CLD_STOPPED for SIGCHLD on stop.
* Drop spurious changeSamuel Thibault2020-12-011-1/+0
|
* hurd_types: Add const_string_t typeSamuel Thibault2020-11-302-0/+2
| | | | | | | | 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.
* MAKEDEV: make /dev/cd* go through rumpdiskSamuel Thibault2020-11-271-1/+1
| | | | * sutils/MAKEDEV.sh (cd*): Set MASTER to @/dev/disk:.
* libdiskfs: do not reuse pathbufSamuel Thibault2020-11-271-6/+2
| | | | | | | | | When deadling with multiple levels of symlinks, we really need double buffering between the current path and the symlink target, and thus cannot reuse pathbuf. * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Always use alloca for pathbuf.
* rumpdisk: implement BLKRRPARTSamuel Thibault2020-11-261-2/+18
| | | | | | | | | | This is used by parted to reload the partition table. Since we do not actually implement partition tables, we can just ignore it. * rumpdisk/block-rump.c (BLKRRPART): New macro. (rumpdisk_device_set_status): New function. (rump_block_emulation_ops): Set device_set_status field to rumpdisk_device_set_status.
* storeio: Translate short reads to EIOSamuel Thibault2020-11-261-0/+8
| | | | | * storeio/dev.c (dev_buf_fill): When store returns less bytes than the block size, assume an EIO.
* libps: support getting RPC names for WAIT outputSamuel Thibault2020-11-235-24/+51
| | | | | | | | | | | * libps/Makefile (SRCS): Add ../utils/msgids.c. (../utils/msgids-CPPFLAGS): Add DATADIR macro. * libps/spec.c: Include "../utils/msgids.h". (get_rpc_name): Implement with msgid_info. * utils/msgids.c (parse_opt): Move end code to ... (msgids_scan_std): ... new function. * utils/msgids.h (msgids_scan_std): New prototype. * utils/ps.c (main): Call msgids_scan_std.
* libshouldbeinlibc: Fix printing truncated backtraceSamuel Thibault2020-11-221-2/+5
| | | | | * libshouldbeinlibc/assert-backtrace.c (__assert_fail_base_backtrace): If returned backtrace is smaller than skip we cannot print anything.
* acpi: Fix table name truncationSamuel Thibault2020-11-221-1/+2
| | | | | | | | | | | | | | | | | | | * acpi/acpifs.c (create_dir_entry): Fix terminating entry->name string. diff --git a/eth-multiplexer/vdev.c b/eth-multiplexer/vdev.c index 367623d9..c76cfbfd 100644 --- a/eth-multiplexer/vdev.c +++ b/eth-multiplexer/vdev.c @@ -139,7 +139,8 @@ add_vdev (char *name, size_t size) vdev->dev_port = ports_get_right (vdev); ports_port_deref (vdev); - strncpy (vdev->name, name, IFNAMSIZ); + strncpy (vdev->name, name, IFNAMSIZ-1); + vdev->name[IFNAMSIZ-1] = '\0'; vdev->if_header_size = ETH_HLEN; vdev->if_mtu = ETH_MTU; vdev->if_header_format = HDR_ETHERNET;
* eth-multiplexer: Fix interface name truncationSamuel Thibault2020-11-221-1/+2
| | | | * eth-multiplexer/vdev.c (add_vdev): Fix terminating vdev->name string.
* libfshelp-tests: Fix warningSamuel Thibault2020-11-221-3/+3
| | | | | * libfshelp-tests/test-fcntl.c (parse_args): Do not call error() with a NULL pointer.
* libfshelp-tests: Fix warningSamuel Thibault2020-11-221-2/+2
| | | | | * libfshelp-tests/test-lockf.c (parse_args): Do not call error() with a NULL pointer.
* test-lockf: Fix warningSamuel Thibault2020-11-221-1/+1
| | | | * libfshelp-tests/test-lockf.c (main): Fix format for off_t.
* libfshelp-tests: Fix warningSamuel Thibault2020-11-221-1/+1
| | | | | * libfshelp-tests/test-flock.c (parse_args): Do not call error() with a NULL pointer.
* libfshelp-tests: Fix warningSamuel Thibault2020-11-221-0/+1
| | | | * libfshelp-tests/race.c: Include <stdlib.h>
* clookup: Fix warningSamuel Thibault2020-11-221-2/+2
| | | | | * sutils/clookup.c (file_name_lookup_carefully): Make head a non-const char *.
* crash: Fix warningSamuel Thibault2020-11-221-1/+1
| | | | * trans/crash.c (template_make_file_name): Fix format for time_t.
* mach-defpager: Fix warningSamuel Thibault2020-11-221-1/+1
| | | | * mach-defpager/default_pager.h (panic): Add noreturn function attribute.
* pflocal: Fix warningSamuel Thibault2020-11-221-0/+1
| | | | * pflocal/sock.c: Include <unistd.h>.
* proc: Fix warningSamuel Thibault2020-11-221-1/+1
| | | | | * proc/stubs.c (send_signal): Add missing warning in union inside mach_msg_header_t.
* libtrivfs: Remove unused empty functionSamuel Thibault2020-11-221-6/+0
| | | | * libtrivfs/make-node.c (init_node): Remove unused empty function.
* libfshelp: Fix extern inline definitionsRomain Naour2020-11-213-3/+7
| | | | | | | | | | | | | | | | | | | | The commit [1] updated rlock.h and fshelp.h to use FSHELP_DEFINE_EXTERN_INLINE but it's never defined because FSHELP_EXTERN_INLINE is used in libfshelp/extern-inline.c. Update this file to use define FSHELP_DEFINE_EXTERN_INLINE. [1] ca3d36201329f0e21b995d831ce9f6f03b6b985e * libfshelp/extern-inline.c: define FSHELP_DEFINE_EXTERN_INLINE. * libfshelp/fshelp.h: define FSHELP_EXTERN_INLINE __extern_inline if FSHELP_DEFINE_EXTERN_INLINE is not defined. * libfshelp/rlock.h: Likewise Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@gnu.org> Message-Id: <20201120230347.2432672-1-romain.naour@gmail.com>
* console-client: Fix listing nodesSamuel Thibault2020-11-181-4/+14
| | | | | | | | * console-client/trans.c (netfs_get_dirents): Fix counting the start node. Return 0 when there are no entries left, instead of trying to mmap zero bytes. (console_create_consnode): Set inode number, other entries get ignored by glibc's readdir().
* rumpdisk: automatically prepend /dev/Samuel Thibault2020-11-161-12/+9
| | | | | | | to keep coherent with other storeio translators, grub scripts, etc. * rumpdisk/block-rump.c (translate_name): Prepend /dev/ to disk name. (is_disk_device): Do not match heading /dev/.
* rumpdisk: auto-disable when kernel runs disk driversSamuel Thibault2020-11-151-28/+65
| | | | | | | | | | | | | | | | | | | | By default we do not want rumpdisk to step over the kernel drivers. * rumpdisk/block-rump.c: Include <device/device.h>. (disabled): New variable. (dev_to_port): Rename to rumpdisk_dev_to_port. (device_init): Rename to rumpdisk_init. Exit if the kernel runs SATA drivers. (device_close): Rename to rumpdisk_device_close. (device_dealloc): Rename to rumpdisk_device_dealloc. (device_shutdown): Rename to rumpdisk_device_shutdown. Do not shutdown when disabled. (device_open): Rename to rumpdisk_device_open. Return D_NO_SUCH_DEVICE when disabled. (device_write): Rename to rumpdisk_device_write. (device_read): Rename to rumpdisk_device_read. (device_get_status): Rename to rumpdisk_device_get_status. (rump_block_emulation_ops): Update refs accordingly.
* libmachdev: Fix spurious send referenceSamuel Thibault2020-11-151-1/+1
| | | | | * libmachdev/trivfs_server.c (trivfs_S_fsys_getpriv): Move the just-copied send rights instead of copying them again.
* libmachdev: Make comments more preciseSamuel Thibault2020-11-151-2/+2
|
* libmachdev: Fix warningSamuel Thibault2020-11-151-0/+1
| | | | * libmachdev/trivfs_server.c: Include <mach/i386/mach_i386.h>.
* libmachdev: Remove duplicate declarationSamuel Thibault2020-11-151-2/+0
| | | | | * libmachdev/ds_routines.c (machdev_is_master_device): Remove duplicate declaration.
* libmachdev: Fix missing backtranslation to port nameSamuel Thibault2020-11-151-0/+1
| | | | | | | | | trivfs happens to set the payload for our control port, and we are not using payload translation for mach_i386, so we need to tell mig how to get back to the port name. * libmachdev/Makefile (mach_i386-MIGSFLAGS): Set -DMACH_PAYLOAD_TO_PORT=ports_payload_get_name.
* MAKEDEV: Set up rump translator and fix netdde translatorSamuel Thibault2020-11-151-2/+8
| | | | | | | * sutils/MAKEDEV.sh (rumpdisk): Set up /dev/rumpdisk and /dev/disk that points to it. (netdde): Point /dev/net to /dev/netdde. (eth*): Use /dev/net instead of /dev/netdde.
* MAKEDEV: Add master and rumpdisk supportSamuel Thibault2020-11-151-5/+17
| | | | | * sutils/MAKEDEV.sh: Add -M option to set the master device node. Add support for wd* devices through rumpdisk.