summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-29Add devnode translatorSamuel Thibault
* devnode: New directory * Makefile (prog-subdirs): Add devnode.
2015-11-12libihash: prefer performance degradation over failureJustus Winter
* libihash/ihash.c (hurd_ihash_add): Add the item even though we are above the load factor if resizing failed.
2015-11-06libihash: optimize lookup-or-insert operationsJustus Winter
If libihash is used to implement a cache, a insertion is always preceeded by a lookup. hurd_ihash_add has to do the lookup again. Provide a new pair of functions, hurd_ihash_locp_add and hurd_ihash_locp_find, that can be used in combination to avoid the second lookup. * libihash/ihash.c (hurd_ihash_locp_add): New function using a location pointer... (hurd_ihash_locp_find): ... that has been returned by this function. * libihash/ihash.h (hurd_ihash_locp_add): New declaration. (hurd_ihash_locp_find): Likewise. (hurd_ihash_locp_value): New function.
2015-11-06libihash: add hurd_ihash_value_validJustus Winter
* libihash/ihash.h (hurd_ihash_value_valid): New function. * libihash/ihash.c (index_empty): Use hurd_ihash_value_valid.
2015-11-06random: satisfy arbitrarily-sized readsJustus Winter
* random/random.c (trivfs_S_io_read): Satisfy arbitrarily-sized reads.
2015-11-06random: use /servers/startup to register for shutdown notificationsJustus Winter
* random/random.c (arrange_shutdown_notification): Use the new way to contact the startup server.
2015-11-06random: improve error handlingJustus Winter
* random/random.c (arrange_shutdown_notification): Improve error handling. (main): Display warning if arranging the shutdown notification failed.
2015-11-06random: fix odd formattingJustus Winter
* random/random.c (trivfs_append_args): Fix odd formatting.
2015-11-06Remove unused variablesJustus Winter
* console/pager.c (user_pager_init): Remove unused variables. * ext2fs/pager.c (create_disk_pager): Likewise. * fatfs/pager.c (create_fat_pager): Likewise. * storeio/pager.c (init_dev_paging): Likewise.
2015-11-03libtrivfs: remove deprecated static class vectorsJustus Winter
This API has been deprecated in Hurd 0.7. * doc/hurd.texi (trivfs_protid_portclasses, trivfs_protid_nportclasses, trivfs_cntl_portclasses, trivfs_cntl_nportclasses): Remove. * libtrivfs/trivfs.h: Likewise. * libtrivfs/mig-decls.h: Adapt accordingly. * libtrivfs/cntl-classes.c: Remove unused file. * libtrivfs/protid-classes.c: Likewise. * libtrivfs/Makefile (OTHERSRCS): Drop the two files.
2015-11-03pfinet: fix sanity check at translator startup timeJustus Winter
* pfinet/main.c (main): Properly iterate over `pfinet_protid_portclasses'.
2015-10-31GNU Hurd 0.7Thomas Schwinge
* configure.ac (AC_INIT): Set version to 0.7. * NEWS: Finalize for 0.7.
2015-10-29pflocal: avoid building the interrupt serverJustus Winter
* pflocal/io.c: Do not needlessly include `interrupt_S.h'.
2015-10-29hurd: fix type of in-translation functionJustus Winter
* hurd/hurd_types.defs (interrupt_t): Fix type of in-translation function.
2015-10-29trans: improve demuxersJustus Winter
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. * trans/proxy-defpager.c (proxy_defpager_demuxer): Improve the demuxer function. * trans/streamio.c (demuxer): Likewise.
2015-10-20Make fakerooted access() return real accessSvante Signell
Various realworld tests would otherwise think they can write to /, while they actually can't. * trans/fakeroot.c (netfs_report_access): Call file_check_access instead of returning O_RDWR|O_EXEC when faking mode too.
2015-10-12Make dir_lookup create files with user permissions enabledSamuel Thibault
So we will always be able to re-open them. * trans/fakeroot.c (netfs_S_dir_lookup): Call real_from_fake_mode() on modes before calling the underlying filesystem's dir_lookup.
2015-10-11Make netfs_S_io_reauthenticate handle allocation errorsSamuel Thibault
* libnetfs/io-reauthenticate.c (netfs_S_io_reauthenticate): Loop when netfs_make_protid fails with EINTR, return error when it fails otherwise.
2015-10-11Drop duplicate port deallocationSamuel Thibault
Follow-up dbfa8a3 * libnetfs/io-reauthenticate.c (netfs_S_io_reauthenticate): Do not deallocate parameter port `rend_port' when an error will be returned. * libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Do not deallocate parameter port `rend_port' when an error will be returned.
2015-10-05Add missing null checks in libshouldbeinlibcJames Clarke
The getpwnam_r and similar functions only return non-zero on error, but not finding the given name/UID/GID does not count as an error. When they return 0, the value of the result (*result when looking at the arguments in the man pages) still needs to be checked for null. * libshouldbeinlibc/idvec-rep.c (lookup_uid): Check result for null. (lookup_gid): Likewise. * libshouldbeinlibc/idvec-verify.c (verify_passwd): Likewise. (verify_id): Likewise.
2015-10-05Update NEWS fileJustus Winter
2015-10-05libdiskfs: fflush stdout when pausingJustus Winter
* libdiskfs/boot-start.c (diskfs_start_bootstrap): fflush stdout when pausing for /hurd/startup.
2015-09-29Minor documentation changesJoshua Branson
* .gitignore: Add generated doc/hurd.aux, doc/hurd.cp, doc/hurd.cps, doc/hurd.fn, doc/hurd.ky, doc/hurd.log, doc/hurd.pdf, doc/hurd.pg, doc/hurd.sc, doc/hurd.toc, doc/hurd.tp, doc/hurd.vr files. * doc/hurd.texi: Fix typo, complete explanation about sharing Mach devices. Complete documentation for shutdown. Replace cthreads with POSIX threads.
2015-09-27libtrivfs: deprecate old apiJustus Winter
* libtrivfs/trivfs.h (trivfs_protid_portclasses): Deprecate, and schedule for removal in Hurd 0.8. (trivfs_protid_nportclasses): Likewise. (trivfs_cntl_portclasses): Likewise. (trivfs_cntl_nportclasses): Likewise.
2015-09-27libtrivfs: optimize the object lookup codeJustus Winter
* libtrivfs/mig-decls.h: Remove the specialized cases, they really blow up these functions that are supposed to be inlined. Also, look into the dynamically allocated vectors first, because this is the preferred way of using libtrivfs since 1997.
2015-09-27trans/proxy-defpager: convert to trivfs dynamic classes and bucketsJustus Winter
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 severe bug. As no classes are given to `trivfs_startup', they are created and inserted into the dynamic vector of classes. The helper function `allowed', however, used the first item of the previously used static array, which is NULL. This circumvented the typecheck, allowing the default pager protocol to be spoken over control ports, likely resulting in a crash. * trans/proxy-defpager.c: Convert to dynamic classes and buckets.
2015-09-27trans/passwd: convert to trivfs dynamic classes and bucketsJustus Winter
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. * trans/password.c: Convert to dynamic classes and buckets.
2015-09-27trans/new-fifo: convert to trivfs dynamic classes and bucketsJustus Winter
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. * trans/new-fifo.c: Convert to dynamic classes and buckets.
2015-09-27trans/magic: convert to trivfs dynamic classes and bucketsJustus Winter
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 severe bug. As no classes are given to `trivfs_startup', they are created and inserted into the dynamic vector of classes. The server function `trivfs_S_fsys_forward', however, used the first item of the previously used static array, which is NULL. This circumvented the typecheck. * trans/magic.c: Convert to dynamic classes and buckets.
2015-09-27trans/ifsock: convert to trivfs dynamic classes and bucketsJustus Winter
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. * trans/ifsock.c: Convert to dynamic classes and buckets.
2015-09-27trans/crash: convert to trivfs dynamic classes and bucketsJustus Winter
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. * trans/crash.c: Convert to dynamic classes and buckets.
2015-09-27pflocal: convert to trivfs dynamic classes and bucketsJustus Winter
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. * pflocal/pflocal.c: Convert to dynamic classes and buckets.
2015-09-27pfinet: convert to trivfs dynamic classes and bucketsJustus Winter
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. * pfinet/main.c: Convert to dynamic classes and buckets. * pfinet/options.c: Likewise. * pfinet/pfinet.h: Likewise. * pfinet/socket-ops.c: Likewise.
2015-09-27exec: convert to trivfs dynamic classes and bucketsJustus Winter
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.
2015-09-27libdiskfs: fflush stdout when pausingJustus Winter
* libdiskfs/boot-start.c (start_execserver): fflush stdout when pausing.
2015-09-27libdiskfs: improve error handlingJustus Winter
* libdiskfs/boot-start.c (start_execserver): Improve error handling.
2015-09-23exec: add missing includeJustus Winter
* exec/main.c: Include `argz.h'.
2015-09-22libports: remove unused variablesJustus Winter
* libports/inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Remove unused variable `bucket'. * libports/inhibit-class-rpcs.c (ports_inhibit_class_rpcs): Remove unused variables `pi' and `rpc'.
2015-09-19Define TIME_VALUE_TO_TIMESPEC only when not defined alreadySamuel Thibault
* exec/elfcore.c (TIME_VALUE_TO_TIMESPEC) [TIME_VALUE_TO_TIMESPEC]: Do not redefine macro.
2015-09-12Turn EADDRNOTAVAIL to more commonly-understood ECONNREFUSEDSamuel Thibault
Thanks Svante Signell for the investigation. * pflocal/socket.c (S_socket_connect, S_socket_send): When addr_get_sock returns EADDRNOTAVAIL, translate into ECONNREFUSED.
2015-09-12Fix build warningSamuel Thibault
* pflocal/sock.h (sock_bind): Move declaration.
2015-09-12Add support for ANSI.SYS SCP/RCP escape codesJames Clarke
This adds support for CSI s and u, which are equivalent to ESC 7 and 8, saving/restoring the cursor position. * console/display.c (handle_esc_bracket): Added support for CSI s and u.
2015-09-11Fix detection of terminated dgram pflocal serverSamuel Thibault
* libpipe/pipe.c (_pipe_no_readers): Break pipe for connection-less pipes too.
2015-09-11Fix closure of local server socketsSamuel Thibault
Since bound socks always have a ref for their address, they would never get freed. Thanks Svante Signell for the investigation. * pflocal/sock.h (sock_deref): When `sock' has one ref left and is bound to an address, unbound it, and thus shut it down.
2015-09-11Fix sock_bind(sock,NULL) supportSamuel Thibault
* pflocal/sock.c (sock_bind): When addr is NULL, do not take/release its mutex. When old_addr is also NULL, return EINVAL. When old_addr is not NULL, deref old_addr instead of addr.
2015-09-10Install port-deref-deferred.h header for ports.hJames Clarke
* libports/Makefile (installhdrs): Add port-deref-deferred.h for ports.h
2015-09-10Do not install libtrivfs mig stub headersSamuel Thibault
They were not usable anyway. * libtrivfs/Makefile (installhdrs): Remove generated mig stub headers.
2015-09-09libshouldbeinlibc/maptime: use memory fencesJustus Winter
* libshouldbeinlibc/maptime.h (maptime_read): Use memory fences.
2015-09-09pflocal: avoid nested functionJustus Winter
* pflocal/io.c (copy_time): Move function out of `S_io_stat', turning it into a static inline function.
2015-09-09umount: Do not report errors on making the device go awaySamuel Thibault
This fixes umounting bind mounts or other mounts for which the device can not be made away. * utils/umount.c (do_umount): When the --force option is not passed, ignore errors from file_set_translator call on the device file.