aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* fs: Support for file record lockingSvante Signell2019-10-293-43/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* libfshelp: Support for file record lockingNeal H Walfield2019-10-297-14/+857
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2019-03-03 Svante Signell <svante.signell@gmail.com> * rlock-tweak.c: Require write access for F_SETLK64 and F_SETLKW64 according to POSIX-1003.1. 2019-02-12 Svante Signell <svante.signell@gmail.com> * rlock-tweak.c: Comment out check of lock->l_type and open_mode 2019-02-01 Svante Signell <svante.signell@gmail.com> * Update copyright years. * 2018-12-07: - Fix typo in fshelp_rlock_tweak. - Move description of rendezvous to fshelp.h. - Removed 64bit versions 2018-12-07 Svante Signell <svante.signell@gmail.com> * Update copyright years. * rlock-tweak.c (fshelp_rlock_tweak): Add new argument: mach_port_t rendezvous. 2017-01-05 Svante Signell <svante.signell@gmail.com> * Update copyright years and headers. * rlock_tweak.c: l_pid is set to 0 when a conflicting lock is taken by another process. Will be fixed by new proc RPCs. 2016-05-23 Svante Signell <svante.signell@gmail.com> * rlock-drop-peropen.c: Port from cthreads to libpthread. * rlock-tweak.c: Likewise * fshelp.h: Likewise * rlock.h: Likewise 2001-04-12 Neal H Walfield <neal@cs.uml.edu> * fshelp.h (struct rlock_box): New structure. (struct rlock_peropen): Likewise. (fshelp_rlock_init): New function. (fshelp_rlock_po_init): Likewise. (fshelp_rlock_drop_peropen): Likewise. (fshelp_rlock_tweak): Likewise. (fshelp_rlock_peropen_status): Likewise. (fshelp_rlock_node_status): Likewise. * rlock-drop-peropen.c: New file. Implement fshelp_rlock_drop_peropen. * rlock-status.c: New file. Implement fshelp_rlock_peropen_status and fshelp_rlock_node_status. * rlock-tweak.c: New file. Implement fshelp_rlock_tweak. * rlock.h: New file. * extern-inline.c: New file. * Makefile (installhdrs): Add rlock.h. (SRCS): Add extern-inline.c, rlock-drop-peropen.c, rlock-tweak.c and rlock-status.c.
* libdiskfs: Fix buildSamuel Thibault2019-10-271-1/+0
| | | | | * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Remove duplicate variable.
* libdiskfs: Do not register active translator if it failed to startSamuel Thibault2019-10-271-37/+36
| | | | | | * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Do not call fshelp_set_active_translator if fshelp_fetch_root returned an error which is not ENOENT.
* Fix build with texinfo 6.7Samuel Thibault2019-10-241-0/+1
| | | | * doc/hurd.texi: Specify document encoding as ISO-8859-1.
* console-client libraries: fix link against external librariesSamuel Thibault2019-09-141-1/+1
| | | | | | | This is needed since "as-needed" is now the default. * console-client/Makefile (%.so.$(hurd-version)): Put $^ before -l flags.
* Fix password checking with as-needed linkingSamuel Thibault2019-09-015-9/+23
| | | | | | | | | | | | | | | Newer gcc toolchains tend to enable as-needed by default, so runtime detection of libcrypt will fail. We can just explicitly link against libcrypt anyway. * configure.ac: Check for `crypt()' in libcrypt. * config.make.in: Substitute HAVE_LIBCRYPT. * libshouldbeinlibc/idvec-verify.c: Include <crypt.h> only when libcrypt is available. Replace weak reference with explicit call and fallback macro. * utils/x.c: Likewise. * libshouldbeinlibc/Makefile (LDLIBS): Add -lcrypt when libcrypt is available.
* Use the data_t type defined in hurd_types.h.Flavio Cruz2019-09-0166-106/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * boot/boot.c: Replace char* with data_t. * console-client/trans.c: Likewise. * exec/exec.c: Likewise. * ext2fs/storeinfo.c: Likewise. * fatfs/inode.c: Likewise. * fatfs/main.c: Likewise. * isofs/inode.c: Likewise. * libdiskfs/boot-start.c: Likewise. * libdiskfs/dir-readdir.c: Likewise. * libdiskfs/file-exec.c: Likewise. * libdiskfs/file-get-fs-opts.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-set-trans.c: Likewise. * libdiskfs/fsys-forward.c: Likewise. * libdiskfs/fsys-getfile.c: Likewise. * libdiskfs/fsys-options.c: Likewise. * libdiskfs/io-read.c: Likewise. * libdiskfs/io-write.c: Likewise. * libnetfs/dir-readdir.c: Likewise. * libnetfs/file-exec.c: Likewise. * libnetfs/file-get-fs-options.c: Likewise. * libnetfs/file-get-storage-info.c: Likewise. * libnetfs/file-get-translator.c: Likewise. * libnetfs/file-set-translator.c: Likewise. * libnetfs/fsstubs.c: Likewise. * libnetfs/fsys-get-options.c: Likewise. * libnetfs/fsys-set-options.c: Likewise. * libnetfs/fsysstubs.c: Likewise. * libnetfs/io-read.c: Likewise. * libnetfs/io-write.c: Likewise. * libtrivfs/dir-readdir.c: Likewise. * libtrivfs/file-get-fs-options.c: Likewise. * libtrivfs/file-get-storage-info.c: Likewise. * libtrivfs/file-get-trans.c: Likewise. * libtrivfs/file-getfh.c: Likewise. * libtrivfs/file-set-trans.c: Likewise. * libtrivfs/fsys-forward.c: Likewise. * libtrivfs/fsys-get-options.c: Likewise. * libtrivfs/fsys-set-options.c: Likewise. * libtrivfs/fsys-stubs.c: Likewise. * libtrivfs/io-read.c: Likewise. * libtrivfs/io-write.c: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/pfinet-ops.c: Likewise. * pfinet/socket-ops.c: Likewise. * pfinet/tunnel.c: Likewise. * pflocal/io.c: Likewise. * pflocal/pf.c: Likewise. * pflocal/socket.c: Likewise. * proc/info.c: Likewise. * startup/startup.c: Likewise. * storeio/io.c: Likewise. * term/users.c: Likewise. * tmpfs/node.c: Likewise. * trans/crash.c: Likewise. * trans/fakeroot.c: Likewise. * trans/fifo.c: Likewise. * trans/firmlink.c: Likewise. * trans/hello-mt.c: Likewise. * trans/hello.c: Likewise. * trans/mtab.c: Likewise. * trans/new-fifo.c: Likewise. * trans/null.c: Likewise. * trans/proxy-defpager.c: Likewise. * trans/streamio.c: Likewise.
* generic-speaker: Fix array iterationguy fleury iteriteka2019-08-271-1/+1
| | | | * console-client/generic-speaker.c (parse_opt): Fix getting array size.
* lwip: Call if_change_flags() inside a thread-safe contextJoan Lledó2019-08-121-5/+55
| | | | | | | * lwip/port/netif/ifcommon.c: * Changing flags for a device (e.g. by inetutils-ifconfig) now takes the big lock to ensure the stack is not doing anything else. Message-Id: <20190622100002.11399-2-jlledom@member.fsf.org>
* Catch LFS64 inconsistencies in RPC server stubsSamuel Thibault2019-07-273-0/+141
| | | | | | | | | | | | | * libdiskfs/diskfs.h (protid_t): New type (diskfs_S_io_write, diskfs_S_io_read, diskfs_S_io_seek, diskfs_S_io_stat, diskfs_S_file_set_size, diskfs_S_file_get_storage_info, diskfs_S_file_statfs): New prototypes. * libnetfs/netfs.h (netfs_S_io_write, netfs_S_io_read, netfs_S_io_seek, netfs_S_io_stat, netfs_S_file_set_size, netfs_S_file_get_storage_info, netfs_S_file_statfs): New prototypes. * libtrivfs/trivfs.h (trivfs_S_io_write, trivfs_S_io_read, trivfs_S_io_seek, trivfs_S_io_stat, trivfs_S_file_set_size, trivfs_S_file_get_storage_info, trivfs_S_file_statfs): New prototypes.
* Fix missing gnu_dev_* prototypesSamuel Thibault2019-07-279-0/+9
| | | | | | | | | | | | * isofs/rr.c: Include <sys/sysmacros.h>. * libdiskfs/file-set-trans.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libnetfs/file-get-translator.c: Likewise. * libnetfs/file-set-translator.c: Likewise. * nfs/nfs.c: Likewise. * nfs/ops.c: Likewise. * storeio/storeio.c: Likewise. * trans/fakeroot.c: Likewise.
* diskfs.h: Expose 64bit typesSamuel Thibault2019-07-273-13/+13
| | | | | | | | | | | | | | | 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'.
* lwip: Fix bug: Error handling on configure_device()Joan Lledó2019-05-111-5/+3
| | | | | | | * lwip/lwip-util.c: * EINVAL was never being returned. * Return error code for tcpip_callback() as errno. Message-Id: <20190511093202.9763-2-jlledom@member.fsf.org>
* shutdown: Use fprintf instead of mach_printSamuel Thibault2019-05-051-2/+2
| | | | | * shutdown/acpi_shutdown.c (disappear_via_acpi): Use fprintf instead of mach_print.
* lwip: Set output flags when calling recv()Joan Lledó2019-05-041-8/+13
| | | | | | | | Lwip 2.1.2 added a new function lwip_recvmsg() which writes out flags for the recv() operation. * lwip/socket-ops.c: Call lwip_recvmsg() instead of lwip_recvfrom(). Message-Id: <20190504082505.7002-2-jlledom@member.fsf.org>
* lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send().Joan Lledó2019-05-041-5/+8
| | | | | | | | | | | Lwip 2.1.2 added a new assertion to ensure that no unsupported flags are being sent to lwip_sendmsg(). MSG_NOSIGNAL is one of these flags and name resolving stopped working. * lwip/socket-ops.c: lwip_S_socket_send(): Clear MSG_NOSIGNAL to ensure is not sent to lwip_sendmsg(). Message-Id: <20190504081959.6463-2-jlledom@member.fsf.org>
* lwip: Error handling when calling update_if()Joan Lledó2019-05-021-29/+33
| | | | | | | * lwip/lwip-util.c: * Check for errors when calling update_if() inside a thread-safe context. Message-Id: <20190502095502.10926-4-jlledom@member.fsf.org>
* diskfs: Fix rename_dir(excl=1) for source directoriesSamuel Thibault2019-04-284-7/+16
| | | | | | | | | | | | | | | | | | | | Starting from coreutils 8.30 which uses renameat2(flag=RENAME_NOREPLACE), we need to have excl=1 to behave correctly, notably in this case: $ mkdir a $ mkdir b $ touch b/t $ mv b a diskfs_rename("b", "a", excl=1) called by mv shall return EEXIST. * libdiskfs/diskfs.h (diskfs_rename_dir): Add `excl' parameter. * doc/hurd.texi (diskfs_rename_dir): Document `excl' parameter. * libdiskfs/dir-renamed.c (diskfs_rename_dir): Add `excl' parameter. Return EEXIST when target exists and `excl' is not 0. * libdiskfs/dir-rename.c (diskfs_S_dir_rename): Pass `excl' to diskfs_rename_dir.
* shutdown: Fix static linkSamuel Thibault2019-04-211-0/+1
| | | | * shutdown/Makefile (LDLIBS): Add -lpthread.
* shutdown: Fix static linkSamuel Thibault2019-04-211-1/+1
| | | | * shutdown/Makefile (HURDLIBS): Add fshelp.
* shutdown: Fix static linkSamuel Thibault2019-04-211-1/+1
| | | | * shutdown/Makefile (HURDLIBS): Add iohelp ihash.
* acpi: Fix static linkSamuel Thibault2019-04-211-1/+1
| | | | * acpi/Makefile (HURDLIBS): Add iohelp ihash.
* lwip: Stop using netifapi.Joan Lledó2019-03-313-36/+55
| | | | | | | | | | | | | | Use tcpip_callback() to reconfigure interfaces in a thread-safe context instead. * lwip/lwip-util.c: * Replace all netifapi calls by their non-netifapi versions. * update_ifs() is called through tcpip_callback(). * lwip/options.c: * Call init_fs() through tcpip_callback(). * lwip/port/netif/ifcommon.c: * Replace all netifapi calls by their non-netifapi versions. Message-Id: <20190331175541.7095-5-jlledom@member.fsf.org>
* lwip: Add headers to the tun driverJoan Lledó2019-03-311-0/+3
| | | | | | | | Since O_CREAT and pals are not included for other headers anymore * lwip/port/netif/hurdtunif.c: * Include sys/types.h, sys/stat.h and fcntl.h Message-Id: <20190331175541.7095-4-jlledom@member.fsf.org>
* lwip: Use the right error type.Joan Lledó2019-03-3110-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use lwip's err_t as return type for functions called from lwip and error_t for functions called from the translator. * lwip/io-ops.c: Include <errno.h> * as is not being included for other headers anymore. * lwip/lwip-util.h: Likewise. * lwip/port/include/netif/hurdethif.h: * Include <errno.h> * Change the return type of the init function to err_t. * lwip/port/include/netif/hurdloopif.h: Liekwise. * lwip/port/include/netif/hurdtunif.h: Likewise. * lwip/port/include/netif/ifcommon.h: Likewise. * lwip/port/netif/ifcommon.c: Likewise. * lwip/port/netif/hurdloopif.c: * Include <errno.h> * Change output function return type to err_t. * Return lwip's err_t codes. * lwip/port/netif/hurdethif.c: * Include <errno.h> * Change init function return type to err_t. * Change output function return type to err_t. * Return lwip's err_t codes. * lwip/port/netif/hurdtunif.c: Likewise. Message-Id: <20190331175541.7095-3-jlledom@member.fsf.org>
* lwip: Fix wrong error checksJoan Lledó2019-03-312-4/+4
| | | | | | | | * lwip/lwip-util.c: init_ifs(): * Check for the value of ifc instead of in->dev_name * lwip/port/netif/ifcommon.c: * if_init(), if_terminate(): Check for null on ifc instead of netif Message-Id: <20190331175541.7095-2-jlledom@member.fsf.org>
* libstore: Fix dopen() with non-path which happens to be a pathSamuel Thibault2019-03-031-27/+31
| | | | | | | For instance storeio on /dev/mem would try to open itself... * libstore/device.c (dopen): Only file_name_lookup() name if it starts with '/'.
* shutdown: rename shutdown RPC to shutdown_shutdownSamuel Thibault2019-03-033-3/+3
| | | | | | | | | 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.
* shutdown: clean up debugging piecesSamuel Thibault2019-03-032-5/+6
| | | | | | | * shutdown/acpi_shutdown.c (disappear_via_acpi): Call ioperm only on required ports, not all ports. * shutdown/shutdown.c (S_shutdown, main): Remove debugging messages, even if joyful :)
* shutdown: fallback on Mach shutdownSamuel Thibault2019-03-031-7/+12
| | | | | * startup/startup.c (reboot_mach): In case do_shutdown returns, fallback to Mach's host_reboot.
* Add to startup relevant shutdown rpc callDamien Zammit2019-03-022-3/+28
| | | | | | | | * startup/Makefile (OBJS): Add shutdownUser.o. * startup/startup.c: Include <stdlib.h> and "shutdown_U.h". (_SERVERS_SHUTDOWN): New macro. (do_shutdown): New function. (reboot_mach): Call do_shutdown when flags contains RB_HALT.
* Add shutdown RPC && ACPI specific disappear routineDamien Zammit2019-03-029-1/+323
| | | | | | | | * 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.
* ACPI tables translatorDamien Zammit2019-03-0216-1/+1919
| | | | | | | | 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.
* hurd: fix error on opening symlink with O_NOFOLLOW|O_WRITESamuel Thibault2019-01-051-2/+4
| | | | | | | POSIX requires ELOOP in that case. * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Return ELOOP instead of EACCES when the result is a symlink and O_WRITE|O_EXEC was requested
* Prepare for rump disk access by making libstore take non-mach deviceDamien Zammit2018-12-261-7/+48
| | | | | * libstore/device.c (dopen): Try to lookup the `name' parameter before trying the mach privileged port.
* pci-arbiter: fix cross-buildSamuel Thibault2018-11-281-1/+1
| | | | * pci-arbiter/Makefile (HURDLIBS): Add iohelp and ihash.
* random: Do not require the latest gcrypt version, just use a version known ↵Samuel Thibault2018-11-181-1/+1
| | | | | | | | | to work This helps with dependency management of binary packages. * trans/random.c (pool_initialize): Pass "1.8.0" to gcry_check_version instead of GCRYPT_VERSION.
* build: Distribute tarball compressed with xz instead of bzip2Guillem Jover2018-11-061-3/+3
| | | | | | * Makefile (dist): Change bz2 to xz. (%.xz): Add target. (%.bz2): Remove target.
* tmpfs: Document issue with removed shm filesSamuel Thibault2018-11-051-0/+2
|
* pci-arbiter: Add TODO fileSamuel Thibault2018-10-301-0/+15
| | | | * pci-arbiter/TODO: New file.
* PCI ArbiterJoan Lledó2018-10-3027-2/+3782
|
* libports: Fix typoSamuel Thibault2018-10-081-1/+1
|
* lwip: Fix build against glibc 2.28Samuel Thibault2018-08-151-0/+1
| | | | lwip/startup.c: Include <signal.h>.
* lwip: Fix a buffer overflow and clear compiler warningsJoan Lledó2018-08-142-2/+2
| | | | | | | GCC 8 new warning -Wstringop-truncation detected some buffer overflows. * lwip/options.c (parse_opt): Fix the buffer overflow. * lwip/pfinet-ops.c (dev_ifconf): Likewise.
* lwip: return EINTR when a select() IPC thread is cancelledJoan Lledó2018-08-141-0/+8
| | | | | | | Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): Detect when the current RPC is cancelled by checking the reply port.
* lwip: refactor main demuxer to avoid code duplicationJoan Lledó2018-08-141-31/+11
| | | | * lwip/main.c (lwip_demuxer): Refactored.
* lwip: poll(): return EIO when POLLERR is setJoan Lledó2018-08-141-0/+3
| | | | | | | Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): If POLLERR is set, return EIO.
* Hurd patches (fix compilation)Luca Weiss2018-06-1311-14/+16
| | | | | | | | | | | | | | | | | | * isofs/rr.c (rrip_work): Use gnu_dev_makedev instead of makedev. * libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Likewise. * libnetfs/file-set-translator.c (netfs_S_file_set_translator): Likeiwse. * nfs/nfs.c (xdr_decode_fattr): Likewise. * storeio/storeio.c (parse_opt): Likewise. * libfshelp/fetch-root.c (fshelp_short_circuited_callback1): Use gnu_dev_major and gnu_dev_minor instead of major and minor. * libnetfs/file-get-translator.c (netfs_S_file_get_translator): Likewise. * nfs/ops.c (netfs_attempt_link): Likewise. * storeio/storeio.c (trivfs_append_args): Likewise. * trans/fakeroot.c (netfs_attempt_mkdev): Likewise. * pfinet/glue-include/linux/mm.h: Include <mach/vm_param.h>. * term/users.c: Include <signal.h>
* console-run: do not complain when running with empty /devSamuel Thibault2018-06-031-1/+4
| | | | | * daemons/console-run.c (open_console): Do not complain if errno is ENOENT on opening /dev/console.