summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-08-23Fix polling pfinet tun for writeSamuel Thibault
* pfinet/tunnel.c (io_select_common): Also handle `SELECT_WRITE' case.
2013-08-16config.make: Use more configure settings when building xkb-dataDavid Michael
* config.make.in (datarootdir,LEX,YACC): New variables. * configure.ac (XKB_BASE): Drop extraneous "/share" from path. * configure.ac: Reset pkg-config status between tests.
2013-07-20pfinet: Fix call to kfree_sSamuel Thibault
kfree_s expects a pointer and a size argument. Currently the sizeof(cache) is used as size argument, this is certainly not what was intented. For reference, this code was present in Linux up to version 2.3.14 and was replaced in 2.3.15. Found using coccinelle and https://raw.github.com/coccinelle/coccinellery/master/sz/sz.cocci. * pfinet/linux-src/net/ipv4/ipmr.c (ipmr_cache_delete): Fix kfree_s call.
2013-07-19Fix error handling macro EJustus Winter
Previously the macro argument err was expanded and thus potentially evaluated multiple times. This is fine for simple values or pure functions, but not for say iohelp_create_iouser. Fix this by evaluating the macro argument only once.
2013-07-15libnetfs: fix consistency checkJustus Winter
passive is not a zero terminated string but a char * combined with a length. If passivelen == 0, passive may very well be not NULL, and dereferencing that pointer might not be safe. At the very least the consistency check is wrong. Fix that by checking passivelen instead of passive. * libnetfs/file-set-trans.c (netfs_S_file_set_translator): Fix sanity check.
2013-07-15libdiskfs: fix consistency checkJustus Winter
passive is not a zero terminated string but a char * combined with a length. If passivelen == 0, passive may very well be not NULL, and dereferencing that pointer might not be safe. At the very least the consistency check is wrong. Fix that by checking passivelen instead of passive. * libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Fix sanity check.
2013-07-07Fix directory rename in firmlinked directorySamuel Thibault
checkpath browses directories up to look against renaming a directory into itself. It used to assume being able to stop at the root of the filesystem. But some per-opens have a shadow_root, where recursion has to stop too. This means checkpath does not check up to the root any more. This is fine, since we already prevent cross-shadow-root renames very early in dir-rename.c, we do not need to check outside of this shadow root. * libdiskfs/dir-renamed.c (checkpath): Also stop at the per-open shadow_root.
2013-07-06swapon: add -v, --verbose argumentJustus Winter
This patch adds a --verbose argument to swapon and swapoff to make it more compatible with the corresponding Linux' utilities. Note that our swapon is verbose by default and has a --quiet argument to make it quiet, so a --verbose argument on it's own does nothing at all. * sutils/swapon.c (main): Handle -v argument.
2013-07-05libfshelp: add missing importJustus Winter
Add missing import of alloca.h. * libfshelp/set-options.c: Add missing import.
2013-07-02Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2013-07-02sutils: fix a compiler warningJustus Winter
Fix a compiler warning by dropping the const qualifier. It is not appropriate to qualify pointers to dynamically allocated memory as const. * sutils/fstab.c (real_name): Drop const qualifier.
2013-07-01swapon: add -e/--ifexists optionPino Toscano
Add the same command line option as in util-linux' swapon to not consider an error if the device/file of a swap entry in fstab does not exist (and not when activating a device specified as argument to `swapon'). * sutils/swapon.c (ifexists): New variable. (options): Add the 'e' option. (parse_opt) <'e'>: Handle case. (swaponoff): New argument skipnotexisting. Return 0 if open_store fails with ENOENT and SKIPNOTEXISTING is on. (main): Adapt swaponoff calls with 0 as parameter for command line arguments, and IFEXISTS for swap entries from fstab.
2013-06-29tmpfs: fix parsing of fsys_set_options requestsJustus Winter
Formerly setting the options using fsys_set_options did not work because runtime_argp.options was set to 0. This fixes "remounting" of tmpfs translators. * tmpfs/tmpfs.c (runtime_argp): Use options as option list.
2013-06-29sutils: fix file_name_lookup_carefullyJustus Winter
file_name_lookup_carefully is like file_name_lookup but tries hard to avoid starting any passive translators while doing the lookup. The callback contains code to get a new handle to the root if it encounters a translator, but this code was not being executed if the node had no record of an passive translator, just an active one. Fix the callback by dropping the test for a passive translator. AIUI the current check for a passive translator makes no sense, as the code is supposed to fail on encountering a passive translator. This fixes lookups inside translators that have no passive translator. For example if /run is a tmpfs started only as active translator, touch /run/lock && mount tmpfs -t tmpfs /run/lock -o size=5M would fail. * sutils/clookup.c (lookup): Drop the test for an passive translator.
2013-06-02Remove unused variableMiguel Figueiredo
* utils/x.c (main): Remove unused variable.
2013-06-02Remove unused variableMiguel Figueiredo
* mach-defpager/default-pager.c : Remove unused variable.
2013-06-01Remove unsused variablesMiguel Figueiredo
* libthreads/cprocs.c : Remove unsused variables.
2013-06-01Add missing breakMiguel Figueiredo
* libcons/vcons-move-mouse.c (cons_vcons_move_mouse): Add missing break.
2013-06-01Fix invalid memory accessMiguel Figueiredo
* init/init.c (start_child): Don't free `arg' before it is used.
2013-06-01Remove unused variableMiguel Figueiredo
* exec/exec.c (check_section): Remove unused variable.
2013-06-01Fix descriptor leakMiguel Figueiredo
* console-client/xkb/compose.c (read_composefile): Always fclose `fc'.
2013-06-01Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2013-06-01Remove unused variableMiguel Figueiredo
* console-client/trans.c (console_setup_node): Remove unused variable.
2013-05-31Reset task priority when spawning a passive translatorRichard Braun
Server threads spawned by libports attempt to adjust their priority and succeed when the server is privileged. This priority is currently inherited by child tasks, which could be passive translators owned by unprivileged users. Reset the priority of the task used for translator instantiation. * libfshelp/start-translator-long.c (fshelp_start_translator_long): Set new task priority to 25 (BASEPRI_USER).
2013-05-30Remove unused variablesMiguel Figueiredo
* mach-defpager/kalloc.c (kalloc_init): remove unused variables
2013-05-27Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2013-05-27Do not compute debugging information by defaultSamuel Thibault
* mach-defpager/kalloc.c (DEBUG): Do not define macro.
2013-05-22Fix some errors in the texinfo documentationRichard Braun
* doc/gpl.texinfo: Replace @unnumbered with @node and @section commands. * doc/hurd.texi: Fix call to @setchapternewpage, remove the @node and @section commands that are now in gpl.texinfo, and remove an erroneous occurrence of 'attributes' before a command.
2013-05-13Revert "utils/vmstat: Use gnumach.defs from gnumach"Samuel Thibault
This reverts commit 202339d49461ce6dcffd3a5b3690537daea5ef38.
2013-05-05utils/vmstat: Use gnumach.defs from gnumachDavid Michael
The gnumach installation provides the include file mach/gnumach.defs instead of mach/gnumach.h. This runs the defs file through MIG and builds the result for vmstat. * utils/vmstat.c: Replace <mach/gnumach.h> with "gnumach_U.h". * utils/Makefile (vmstat): Add rule to depend on gnumach_U.o. * Makeconf (mach_defs_names): Add gnumach.
2013-05-05SYMLOOP_MAX may be undefined under some build flagsSamuel Thibault
* libdiskfs/boot-start.c (diskfs_start_bootstrap): Use value returned by sysconf (_SC_SYMLOOP_MAX) instead of SYMLOOP_MAX.
2013-05-01Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2013-05-01Fix console hang on unknown key pressSamuel Thibault
* console-client/xkb/kstoucs.c (find_ucs): Remove middle value from recursive call range.
2013-04-06pfinet: fix timeout evaluationRichard Braun
* pfinet/timer-emul.c (timer_function): Fix comparison between expire time and jiffies.
2013-03-26Fix tunnel and dummy interfacesSamuel Thibault
* pfinet/linux-src/include/linux/netdevice.h (netdevice): Add `change_flags' field. * pfinet/ethernet.c (ethernet_change_flags): Make function static. (setup_ethernet_device): Set `change_flags' field of `dev' to ethernet_change_flags. * pfinet/linux-src/net/core/dev.c (dev_change_flags): Call `change_flags' field of `dev' if non-nul, instead of calling ethernet_change_flags. * pfinet/pfinet.h (ethernet_change_flags): Remove function prototype.
2013-03-26Fix remap invocationSamuel Thibault
* utils/remap.sh (REMAPPED): Default to empty. (while): Break as soon as there are no arguments any more. Do not break on mapping parameters
2013-03-11Update nasty/nice priority limitSamuel Thibault
* libps/procstat.c (thread_state): Update nasty/nice limit to 25 instead of 12.
2013-03-11Fix libpthread conversionSamuel Thibault
* pfinet/io-ops.c (io_select_common): Call pthread_mutex_unlock instead of __mutex_unlock.
2013-03-01rpctrace: implement -EPino Toscano
Add a -E option to rpctrace, much like its strace's equivalent, to add/change/unset environment variables among the ones inherited by the process. Implements the savannah task #9331. * utils/rpctrace.c: Include <envz.h>. (options): Add the 'E' option. (parse_opt) <'E'>: Handle case. Create ENVZ from ENVP, and change it according to ARG. (main): Create CMD_ENVP from ENVZ if not null, or assign ENVP to it. Pass CMD_ENVP to traced_spawn.
2013-02-28Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2013-02-28Add io_select_timeout to the io interfaceRichard Braun
This change fixes a problem that can occur with non-blocking (and also blocking for very short times) select/poll calls. The problem occurs because the timeout is implemented at the client side. For a non-blocking call, this means that (depending on the code path taken in the C library) the client could get a timeout without a full RPC round-trip to the server. Moving the implementation of the timeout to the servers guarantees a full round-trip, and correct results for non-blocking calls. The modifications in this change depend on the availability of the recently added pthread_hurd_cond_timedwait_np function in libpthread. * boot/boot.c (io_select_common): New static function. (S_io_select): Use io_select_common. (S_io_select_timeout): New function which makes use of io_select_common. * console-client/kbd-repeat.c (repeater_select): Add a timeout parameter. * console-client/pc-mouse.c (repeater_select): Likewise. * console-client/trans.c (io_select_common): New static function. (netfs_S_io_select): Use io_select_common. (netfs_S_io_select_timeout): New function which makes use of io_select_common. * console-client/trans.h (struct consnode): Add a timeout parameter. * hurd/io.defs (io_select_timeout): New MIG routine. * hurd/io_reply.defs (io_select_timeout_reply): New MIG simpleroutine. * hurd/io_request.defs (io_select_timeout_request): Likewise. * libdiskfs/io-select.c (diskfs_S_io_select_timeout): New function. * libnetfs/io-select.c (netfs_S_io_select_timeout): Likewise. * libpipe/pipe.c (pipe_pair_select): Add a timeout parameter. * libpipe/pipe.h (pipe_select_readable): Likewise. (pipe_select_writable): Likewise. (pipe_pair_select): Likewise. * libpipe/pq.h: Include <hurd/hurd_types.h>. * libtrivfs/io-select.c (trivfs_S_io_select_timeout): New function. * pfinet/glue-include/linux/sched.h: Include <errno.h>. (interruptible_sleep_on): Function removed, replaced with ... (interruptible_sleep_on_timeout): New function. (schedule): Update to use interruptible_sleep_on_timeout. (schedule_timeout): Likewise. * pfinet/io-ops.c (io_select_common): New static function. (S_io_select): Use io_select_common. (S_io_select_timeout): New function which makes use of io_select_common. * pfinet/tunnel.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * pflocal/connq.c (connq_listen): Replace noblock with a timeout parameter. * pflocal/connq.h: Include <hurd/hurd_types.h>. (connq_listen): Update declaration to replace noblock with a timeout parameter. * pflocal/io.c (io_select_common): New static function. (S_io_select): Use io_select_common. (S_io_select_timeout): New function which makes use of io_select_common. * pflocal/socket.c (S_socket_accept): Update call to connq_listen to match new declaration. * storeio/io.c (trivfs_S_io_select_timeout): New function. * term/ptyio.c (pty_io_select): Add a timeout parameter. * term/term.h (pty_io_select): Likewise. * term/users.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * trans/fifo.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * trans/firmlink.c (trivfs_S_io_select_timeout): New function. * trans/new-fifo.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * trans/null.c (trivfs_S_io_select_timeout): New function. * trans/streamio.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common.
2013-02-28Add the timespec_t Hurd typeRichard Braun
This type matches the standard struct timespec, and allows passing time values with nanosecond precision in RPCs. * hurd/hurd_types.defs (timespec_t): New MIG type. * hurd/hurd_types.h: Include <time.h>. (timespec_t): New C type, aliasing struct timespec.
2013-02-27hello-mt: fix pthread porting issuePino Toscano
Properly use pthread_mutex_destroy as equivalent for cthreads' mutex_clear, instead of pthread_mutex_init. Issue kindly reported by Nick Lloyd, thanks! * trans/hello-mt.c (close_hook): Call pthread_mutex_destroy instead of pthread_mutex_init.
2013-02-26Replace configure.in with configure.acPino Toscano
* INSTALL: Replace configure.in with configure.ac * Makefile ($(top_srcdir)/configure): Likewise.
2013-02-26Update config.guess and config.subPino Toscano
Fetch newer versions of them from their upstream repository. * config.guess: Update from upstream config.git repository. * config.sub: Likewise.
2013-02-26Rename configure.in to configure.acPino Toscano
Newer autoconf versions will not support the "configure.in" naming anymore, only "configure.ac". * configure.in: Move file... * configure.ac: ... here.
2013-02-26Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2013-02-26Add remap translatorSamuel Thibault
* trans/remap.c: New file. * trans/Makefile (targets): Add remap. (SRCS): Add remap.c. (remap): Add rule. * utils/remap.sh: New script. * utils/Makefile (targets): Add remap. (special-targets): Add remap. (SRCS): Add remap.sh. * NEWS: Advertise new translator
2013-02-25Include <stdlib.h> or <mach.h> where neededPino Toscano
cthreads.h includes both <stdlib.h> and <mach.h>, while pthreads.h does not; with the switch to pthreads, their lack causes prototype compilation warnings for malloc/calloc/free/abort, and mach_task_self/mach_reply_port/etc in few places. * console-client/vga-support.c: Include <stdlib.h>. * libiohelp/iouser-dup.c: Likewise. * libiohelp/iouser-free.c: Likewise. * libiohelp/iouser-reauth.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libiohelp/shared.c: Likewise. * pflocal/connq.c: Likewise. * nfsd/cache.c: Include <mach.h>.
2013-02-24Always set flags on ethernet interfaceSamuel Thibault
* pfinet/linux-src/net/core/dev.c (dev_change_flags): Call ethernet_change_flags. * pfinet/iioctl-ops.c (S_iioctl_siocsifflags): Do not call ethernet_change_flags after calling dev_change_flags.