aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* libfshelp: Avoid some right diddling.Justus Winter2017-09-121-2/+2
| | | | | * libfshelp/translator-list.c (fshelp_set_active_translator): Avoid updating the entry if the control port is still the same.
* libfshelp: Improve error handling.Justus Winter2017-09-121-3/+16
| | | | | | * libfshelp/translator-list.c (fshelp_set_active_translator): Free resources. Assert that an entry is removed. (fshelp_remove_active_translator): Assert that an entry is removed.
* Normalize path of translators.Justus Winter2017-09-122-2/+14
| | | | | | * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Strip trailing slashes. * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
* libfshelp: Add function to map over all active translators.Justus Winter2017-09-1210-140/+196
| | | | | | | | | | | | | | * libdiskfs/file-syncfs.c (diskfs_S_file_syncfs): Use the new function. * libdiskfs/fsys-options.c (diskfs_S_fsys_set_options): Likewise. * libdiskfs/fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise. * libdiskfs/shutdown.c (diskfs_shutdown): Likewise. * libfshelp/fshelp.h (fshelp_map_active_translators): New declaration. * libfshelp/translator-list.c (fshelp_map_active_translators): New function. * libnetfs/file-syncfs.c (netfs_S_file_syncfs): Use the new function. * libnetfs/fsys-set-options.c (netfs_S_fsys_set_options): Likewise. * libnetfs/fsys-syncfs.c (netfs_S_fsys_syncfs): Likewise. * libnetfs/shutdown.c (netfs_shutdown): Likewise.
* libfshelp: Always register dead-name notifications.Justus Winter2017-09-121-18/+15
| | | | | * libfshelp/translator-list.c (fshelp_set_active_translator): Always register dead-name notifications.
* libfshelp: Avoid useless allocations.Justus Winter2017-09-121-0/+4
| | | | | * libfshelp/translator-list.c (fshelp_set_active_translator): Avoid allocating an entry unless a valid control port is given.
* Fix active translator registration.Justus Winter2017-09-122-76/+64
| | | | | | | * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Unconditionally register translators. Previously, we missed translators because 'transbox.active' is not in fact reset if the translator dies. * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
* libfshelp: improve translator listJustus Winter2017-09-121-24/+35
| | | | | | | | | Use the path names of active translators as keys in the hash table. * libfshelp/translator-list.c (hash, compare): New functions. (translator_ihash): Use generalized key interface. (fshelp_set_active_translator): Update accordingly. (fshelp_remove_active_translator): Likewise.
* pflocal: Use default stub implementations.Justus Winter2017-09-123-376/+2
| | | | | | | | * pflocal/Makefile (fsServer-CFLAGS): Make use of default implementations. (ioServer-CFLAGS): Likewise. * pflocal/fs.c: Remove all stub functions. * pflocal/io.c: Likewise.
* storeio: Avoid calling mmap with zero sizeSamuel Thibault2017-09-111-2/+5
| | | | | * storeio/dev.c (dev_open): When store is zero-sized, set buf to NULL instead of calling mmap().
* Fix build with glibc-2.26Samuel Thibault2017-09-101-0/+1
| | | | * nfsd/cache.c: Include <stdint.h>
* exec: Avoid calling mmap with zero sizeSamuel Thibault2017-09-101-0/+2
| | | | | | mmap is supposed to return an error on passing a zero size. * exec/exec.c (servercopy): Immediately return NULL if argsize is 0.
* pfinet: select UDP/TCP ports randomlySamuel Thibault2017-09-106-21/+10
| | | | | | | | | | | | | | * pfinet/linux-src/include/net/tcp.h (tcp_port_rover): Remove declaration * pfinet/linux-src/include/net/udp.h (udp_port_rover): Likewise. * pfinet/linux-src/net/ipv4/tcp_ipv4.c (tcp_port_rover): Remove variable. (tcp_v4_get_port): Take port hint from net_random() instead of tcp_port_rover. * pfinet/linux-src/net/ipv4/udp.c (udp_port_rover, udp_v4_get_port): Likewise. * pfinet/linux-src/net/ipv6/tcp_ipv6.c (tcp_v6_get_port): Likewise. * pfinet/linux-src/net/ipv6/udp_ipv6.c (udp_v6_get_port): Likewise.
* Remove unused parameter from the 'get_source' machinery.Justus Winter2017-09-0112-37/+29
| | | | | | | | | | | | | | | | | | | | | * libdiskfs/diskfs.h (diskfs_get_source): Remove first parameter. * libdiskfs/file-get-source.c (diskfs_S_file_get_source): Adapt callsite. * libdiskfs/get-source.c (diskfs_get_source): Adapt default implementation. * libnetfs/netfs.h (netfs_get_source): Remove first parameter. * libnetfs/file-get-source.c (netfs_S_file_get_source): Adapt callsite. * libnetfs/get-source.c (netfs_get_source): Adapt default implementation. * libtrivfs/trivfs.h (trivfs_get_source): Remove first parameter. * libtrivfs/file-get-source.c (trivfs_S_file_get_source): Adapt callsite. * libtrivfs/get-source.c (trivfs_get_source): Adapt default implementation. * nfs/main.c (netfs_get_source): Adapt implementation. * procfs/main.c (netfs_get_source): Likewise. * trans/firmlink.c (trivfs_get_source): Likewise.
* trans/mtab: Fix warnings.Justus Winter2017-09-011-16/+20
| | | | | | * trans/mtab.c (get_credentials): Fix error handling. (mtab_populate): Fix type. (trivfs_S_io_seek): Avoid implicit fallthrough warnings.
* trans/symlink: Use default server stubs.Justus Winter2017-08-252-59/+1
| | | | | * trans/Makefile (fsysServer-CFLAGS): Use default server stubs. * trans/symlink.c: Remove all the fsys stubs.
* startup: Don't spin on host_reboot failures.Justus Winter2017-08-251-3/+4
| | | | | * startup/startup.c (reboot_mach): Do not retry needlessly if host_reboot fails.
* libnetfs: Remove redundant type checks.Justus Winter2017-08-242-6/+2
| | | | | | * libnetfs/file-get-children.c (netfs_S_file_get_children): Drop redundant type checks. * libnetfs/file-get-source.c (netfs_S_file_get_source): Likewise.
* libdiskfs: Simplify type checks.Justus Winter2017-08-246-19/+13
| | | | | | | | | * libdiskfs/diskfs.h (diskfs_begin_using_control_port): Check port class. * libdiskfs/fsys-getfile.c (diskfs_S_fsys_getfile): Drop check. * libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Likewise. * libdiskfs/fsys-goaway.c (diskfs_S_fsys_goaway): Likewise. * libdiskfs/fsys-options.c (diskfs_S_fsys_{s,g}et_options): Likewise. * libdiskfs/fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
* libdiskfs: Use control class for the singleton 'bootinfo'.Justus Winter2017-08-243-10/+8
| | | | | | | | | | | | * libdiskfs/boot-start.c (bootinfo): New variable. (diskfs_start_bootstrap): Create 'bootinfo' as an instance of 'diskfs_control_class'. (diskfs_S_fsys_getpriv): Only allow operation on 'bootinfo'. (diskfs_S_fsys_init): Allow operation on any control object, but only once. * libdiskfs/diskfs.h (diskfs_initboot_class): Drop declaration. * libdiskfs/init-init.c (diskfs_initboot_class): Drop variable. (diskfs_init_diskfs): Adapt.
* eth-multiplexer: Fix type check.Justus Winter2017-08-241-1/+2
| | | | | * eth-multiplexer/device_impl.c (ds_device_open): Check the port class.
* ext2fs: Improve inlining.Justus Winter2017-08-241-2/+26
| | | | | * ext2fs/ext2fs.h: Add missing declarations needed when inlining is disabled.
* Drop the register qualifier.Justus Winter2017-08-236-35/+35
| | | | | | | | | * console/display.c: Drop 'register'. * eth-multiplexer/dev_stat.c: Likewise. * libbpf/bpf_impl.c: Likewise. * libbpf/queue.c: Likewise. * libports/manage-multithread.c: Likewise. * libports/manage-one-thread.c: Likewise.
* eth-multiplexer: Respect interfaces up flags.Justus Winter2017-08-232-1/+16
| | | | | | | | | * eth-multiplexer/device_impl.c (ds_device_write): Deny writes when interface is down. * eth-multiplexer/vdev.c (add_vdev): Initialize flags to a sane value. (broadcast_pack): Skip interfaces that are down. (broadcast_msg): Likewise.
* eth-multiplexer: Allow setting of flags.Justus Winter2017-08-233-1/+109
| | | | | | | | * eth-multiplexer/dev_stat.c (wants_all_multi_p): New function. (vdev_setstat): Likewise. * eth-multiplexer/device_impl.c (ds_device_set_status): Use new function. * eth-multiplexer/vdev.h (vdev_setstat): New declaration.
* eth-multiplexer: Generalize function and improve error handling.Justus Winter2017-08-232-17/+26
| | | | | | | | * eth-multiplexer/ethernet.c (set_promisc): Rename to 'eth_set_clear_flags' and generalize. (ethernet_open): Adapt call site. (ethernet_close): Likewise. * eth-multiplexer/ethernet.h (eth_set_clear_flags): New declaration.
* eth-multiplexer: Remove local definiton.Justus Winter2017-08-231-3/+0
| | | | * eth-multiplexer/ethernet.c (NET_FLAGS): Drop macro.
* eth-multiplexer: Implement getting the devices flags.Justus Winter2017-08-221-0/+5
| | | | | * eth-multiplexer/dev_stat.c (dev_getstat): Implement the NET_FLAGS flavor.
* eth-multiplexer: Fix error handling.Justus Winter2017-08-221-4/+2
| | | | | * eth-multiplexer/device_impl.c (ds_device_write): Do not deallocate data, it is destroyed by the server loop ("consume-on-success").
* startup: Improve error handling.Justus Winter2017-08-111-3/+5
| | | | * startup/startup.c (main): Improve error handling.
* libshouldbeinlibc: Fix wiring code.Justus Winter2017-08-112-51/+97
| | | | | | | | | | | | | | * libshouldbeinlibc/wire.c (statically_linked): New function. (loaded): Remove check. (wire_segment_internal): Fix error handling. Be smarter about the wiring, inspired by the mach-defpager code. (wire_segment): Fix error handling. (wire_task_self): Fix error handling. Distinguish between static binaries and dynamic binaries without DT_DEBUG or link map. When we don't have a map, fall back to wiring the whole space. Wire future allocations. * libshouldbeinlibc/wire.h (wire_task_self): Return error_t. (wire_segment): Likewise.
* startup: Fix retrieving the privileged ports.Justus Winter2017-08-111-2/+4
| | | | | * startup/startup.c: Give the privileged ports to the glibc so that other code can get them.
* ext2fs: Fix warning.Justus Winter2017-08-101-1/+1
| | | | * ext2fs/xattr.c (ext2_set_xattr): Initialize 'block'.
* libdiskfs: Make mapping the time device more robust.Justus Winter2017-08-061-5/+7
| | | | | * libdiskfs/init-init.c (diskfs_init_diskfs): First try /dev/time, then fall back to the Mach device.
* Make build system more robust.Justus Winter2017-08-061-2/+2
| | | | | * Makeconf: Use '#' instead of '/' in the sed command to avoid clashing with the path separator '/'.
* Replace bcopy with memcpy or memmove as appropriate.Justus Winter2017-08-058-14/+14
| | | | | | | | | | | * boot/boot.c: Replace bcopy with memcpy or memmove as appropriate. * exec/hashexec.c: Likewise. * libps/proclist.c: Likewise, but also fix the amount of data copied. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/timefmt.c: Likewise.
* Simplify deallocations.Justus Winter2017-08-0511-39/+20
| | | | | | | | | | | | | | | | | | | | | | | | free (NULL) is a nop, therefore it is not necessary to check that first. Simplify the code accordingly. This commit is the result of the following semantic patch: @@ identifier X; @@ -if (X) free (X); +free (X); * console-client/console.c: Simplify accordingly. * console-client/driver.c: Likewise. * console-client/vga.c: Likewise. * ftpfs/dir.c: Likewise. * libftpconn/unix.c: Likewise. * libps/fmt.c: Likewise. * libps/proclist.c: Likewise. * libstore/mvol.c: Likewise. * nfs/ops.c: Likewise. * proc/host.c: Likewise. * sutils/fstab.c: Likewise.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-05229-865/+872
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* procfs: Provide 'hostinfo'.Justus Winter2017-08-051-1/+59
| | | | | * procfs/rootdir.c (rootdir_gc_hostinfo): New function. (rootdir_entries): New entry 'hostinfo'.
* Fix harmless indentation errors tripping [-Wmisleading-indentation].Justus Winter2017-08-052-4/+4
| | | | | * trans/new-fifo.c (main): Fix indentation. * utils/rpctrace.c (discover_receive_right): Likewise.
* Fix typo.Maksym Planeta2017-08-051-1/+1
| | | | * ext2fs/truncate.c (force_delayed_copies): Fix typo.
* build: Drop unused/unsubstituted config variablesDavid Michael2017-06-261-2/+0
| | | | * config.make.in (HAVE_BLKID, HAVE_DAEMON): Drop variable.
* Revert "Fix taking into account prefix for xkb-data installation"Samuel Thibault2017-06-261-2/+2
| | | | | | This reverts commit a4f5b76390f1c7b377efbac488b57fa6756da80a. This broke existing configurations (Debian and Guix), more investigation seems to be needed for Arch.
* libshouldbeinlibc: Add missing include.Justus Winter2017-06-201-0/+2
| | | | | * libshouldbeinlibc/assert-backtrace.h: Include 'sys/cdefs.h' for '__STRING'.
* trans/fakeroot: Obey O_NOFOLLOW.Justus Winter2017-06-201-1/+59
| | | | | * trans/fakeroot.c (netfs_S_dir_lookup): Do not follow symlinks if the client used O_NOFOLLOW.
* Fix taking into account prefix for xkb-data installationLuca Weiss2017-06-191-2/+2
| | | | | | | * console-client/Makefile (install): Prepend $(prefix) to install target. * console-client/Makefile ($(XKB_BASE)/%): Rename target to $(prefix)$(XKB_BASE)/%.
* trans: Fix parallel build race around MIG-generated headersDavid Michael2017-06-101-0/+1
| | | | | | | This causes random.d to be generated which makes random.o depend on mach_debug_U.h, ensuring it exists before random.c is compiled. * trans/Makefile: Add random.c to SRCS when gcrypt is used.
* ext2fs: Reduce verbosity of missing xattr support on the FSSamuel Thibault2017-06-091-1/+1
| | | | | * ext2fs/xattr.c (ext2_free_xattr_block): Only warn about missing ext2fs support in debugging mode.
* hurd: Fix the use of polymorphic types.Justus Winter2017-06-051-3/+3
| | | | | | | | | Fixes baf7e5c8ce176aead15c2559952d8bdf0da41ffd. * hurd/process.defs (proc_getmsgport): Make 'msgport' parameter polymorphic only on the sender side. (proc_task2proc): Likewise for 'proc'. (proc_pid2proc): Likewise.
* trans: Conditionally build the random translator.Justus Winter2017-06-045-4/+166
| | | | | | | | | | | | Only build the random translator if we find a suitable version of libgcrypt. This helps to reduce the build dependencies to bootstrap the Hurd. * aclocal.m4: Include 'libgcrypt.m4'. * config.make.in (HAVE_LIBGCRYPT): New variable. * configure.ac: Check for a suitable libgcrypt. * m4/libgcrypt.m4: New file. * trans/Makefile: Conditionally build the random translator.