aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unused variablesMiguel Figueiredo2013-05-301-2/+0
| | | | * mach-defpager/kalloc.c (kalloc_init): remove unused variables
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2013-05-272-8/+4
|\
| * Fix some errors in the texinfo documentationRichard Braun2013-05-222-8/+4
| | | | | | | | | | | | | | * 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.
* | Do not compute debugging information by defaultSamuel Thibault2013-05-271-1/+1
|/ | | | * mach-defpager/kalloc.c (DEBUG): Do not define macro.
* Revert "utils/vmstat: Use gnumach.defs from gnumach"Samuel Thibault2013-05-133-4/+2
| | | | This reverts commit 202339d49461ce6dcffd3a5b3690537daea5ef38.
* utils/vmstat: Use gnumach.defs from gnumachDavid Michael2013-05-053-2/+4
| | | | | | | | | | 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.
* SYMLOOP_MAX may be undefined under some build flagsSamuel Thibault2013-05-051-1/+2
| | | | | * libdiskfs/boot-start.c (diskfs_start_bootstrap): Use value returned by sysconf (_SC_SYMLOOP_MAX) instead of SYMLOOP_MAX.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2013-05-011-2/+2
|\
| * pfinet: fix timeout evaluationRichard Braun2013-04-061-2/+2
| | | | | | | | | | * pfinet/timer-emul.c (timer_function): Fix comparison between expire time and jiffies.
* | Fix console hang on unknown key pressSamuel Thibault2013-05-011-2/+2
|/ | | | | * console-client/xkb/kstoucs.c (find_ucs): Remove middle value from recursive call range.
* Fix tunnel and dummy interfacesSamuel Thibault2013-03-264-4/+7
| | | | | | | | | | | * 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.
* Fix remap invocationSamuel Thibault2013-03-261-2/+4
| | | | | | * utils/remap.sh (REMAPPED): Default to empty. (while): Break as soon as there are no arguments any more. Do not break on mapping parameters
* Update nasty/nice priority limitSamuel Thibault2013-03-111-2/+2
| | | | | * libps/procstat.c (thread_state): Update nasty/nice limit to 25 instead of 12.
* Fix libpthread conversionSamuel Thibault2013-03-111-1/+1
| | | | | * pfinet/io-ops.c (io_select_common): Call pthread_mutex_unlock instead of __mutex_unlock.
* rpctrace: implement -EPino Toscano2013-03-011-1/+49
| | | | | | | | | | | | | 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.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2013-02-286-357/+594
|\
| * hello-mt: fix pthread porting issuePino Toscano2013-02-271-1/+1
| | | | | | | | | | | | | | | | 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.
| * Replace configure.in with configure.acPino Toscano2013-02-262-3/+3
| | | | | | | | | | * INSTALL: Replace configure.in with configure.ac * Makefile ($(top_srcdir)/configure): Likewise.
| * Update config.guess and config.subPino Toscano2013-02-262-353/+590
| | | | | | | | | | | | | | Fetch newer versions of them from their upstream repository. * config.guess: Update from upstream config.git repository. * config.sub: Likewise.
| * Rename configure.in to configure.acPino Toscano2013-02-261-0/+0
| | | | | | | | | | | | | | Newer autoconf versions will not support the "configure.in" naming anymore, only "configure.ac". * configure.in: Move file... * configure.ac: ... here.
* | Add io_select_timeout to the io interfaceRichard Braun2013-02-2829-102/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add the timespec_t Hurd typeRichard Braun2013-02-282-0/+4
|/ | | | | | | | | 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.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2013-02-268-0/+11
|\
| * Include <stdlib.h> or <mach.h> where neededPino Toscano2013-02-258-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* | Add remap translatorSamuel Thibault2013-02-265-5/+226
|/ | | | | | | | | | | | * 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
* Always set flags on ethernet interfaceSamuel Thibault2013-02-242-5/+4
| | | | | | | * 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.
* Fix IPv6 by receiving all multicastSamuel Thibault2013-02-241-0/+5
| | | | * pfinet/ethernet.c (setup_ethernet_device): Add IFF_ALLMULTI to dev->flags.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2013-02-242-3/+39
|\
| * Sync the io_request, io_reply and io interfacesRichard Braun2013-02-152-3/+39
| | | | | | | | | | | | | | | | | | | | | | * hurd/io_reply.defs (io_server_version_reply): New MIG simpleroutine. (io_pathconf_reply): Likewise. (io_identity_reply): Likewise. (io_revoke_reply): Likewise. * hurd/io_request.defs (io_select_request): Fix declaration. (io_pathconf_request): New MIG simpleroutine. (io_identity_request): Likewise. (io_revoke_request): Likewise.
* | Enable IPv6 packets between netdde and pfinetSamuel Thibault2013-02-241-7/+7
|/ | | | | * pfinet/ethernet.c (bpf_ether_filter): Make rules more readable. Add rule to enable IPv6 frames.
* Fix registers recording in core dumpSamuel Thibault2013-02-111-4/+4
| | | | | * exec/elfcore.c (fetch_thread_regset): Fix field shifting order to avoid losing register content.
* Permit to use a tunnel not in /devSamuel Thibault2013-02-052-5/+22
| | | | | | | * pfinet/main.c (find_device): Use basename of NAME for the comparison against "tun" and "dummy". * pfinet/tunnel.c (setup_tunnel_device): Only prepend "/dev/" to tun name if the parameter is not a path.
* Fix spurious port deallocationSamuel Thibault2013-01-291-0/+2
| | | | | | | Replies are directly sent from client to actual server. * trans/fakeroot.c (netfs_demuxer): Return MIG_NO_REPLY, to notify server loop that no reply should be sent.
* Do not warn about not raising priority of non-root translatorsSamuel Thibault2013-01-271-1/+1
| | | | | * libports/manage-multithread.c (adjust_priority): Do not warn when raising the priority returns EPERM.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2013-01-271-15/+29
|\
| * Report VM cache statisticsRichard Braun2013-01-141-15/+29
| | | | | | | | | | | | | | | | * utils/vmstat.c: Include <mach/gnumach.h> and <mach/vm_cache_statistics.h>. (vm_state): New `cache_stats` member. (vm_state_refresh): Call vm_cache_statistics. (_F): Adjust offset. (fields): Add entries for new statistics and adjust member names.
* | Add canonicalize option to hostmuxSamuel Thibault2013-01-273-8/+22
|/ | | | | | | | | | | Taking the canonical name makes very little sense nowadays with a lot of services behind the same IP but virtual hostnames. * hostmux/hostmux.h (hostmux): Add canonicalize field. * hostmux/hostmux.c (options, parse_opt): Add -C/--canonicalize option. * hostmux/mux.c (lookup_host): Only call getaddrinfo if canonicalize is true, pass NULL as HE to lookup_addrinfo otherwise. (lookup_addrinfo): When !HE, use name given by user.
* Pass pfinet errors to io_select callersSamuel Thibault2013-01-142-5/+10
| | | | | | | | This will be needed to properly support poll in glibc. * pfinet/glue-include/linux/poll.h (POLLERR): Define to 0x1000. * pfinet/io-ops.c (S_io_select): Look for POLLERR condition. On such condition, return EIO.
* Use SOL_* values from libcSamuel Thibault2013-01-141-0/+6
| | | | | * pfinet/glue-include/linux/socket.h (SOL_IP, SOL_IPV6, SOL_ICMPV6): Define only if not defined by libc already.
* Add TASK_EVENTS_INFO support to libpsDavid Höppner2013-01-132-2/+6
| | | | | | * libps/procstat.c (merge_procinfo): Also copy taskevents. * libps/procstat.c (set_procinfo_flags): Set pointer to task_events_info. * tasks: Remove TASK_EVENTS_INFO item.
* [IPV6]: Add IPV6_V6ONLY socket option support.Samuel Thibault2013-01-1312-34/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-picked from Linux 524354b4d086a4f013343d727eaccb7b4c39eb25 * pfinet/glue-include/linux/ipv6.h: Include linux/config.h> (__ipv6_only_sock, ipv6_only_sock): New macros * pfinet/linux-src/include/linux/ipv6.h: Likewise. * pfinet/linux-src/include/linux/in6.h (IPV6_V6ONLY): New macro. * pfinet/linux-src/include/linux/sysctl.h (NET_IPV6_BINDV6ONLY): New macro. * pfinet/linux-src/include/net/ipv6.h (sysctl_ipv6_bindv6only): Declare variable. * pfinet/linux-src/include/net/sock.h (ipv6_pinfo): Add ipv6only field. * pfinet/linux-src/net/ipv4/tcp_ipv4.c: Include linux/ipv6.h. (tcp_v4_get_port, tcp_v4_lookup_listener): Test for ipv6_only_sock. * pfinet/linux-src/net/ipv4/udp.c: Include linux/ipv6.h. (udp_v4_get_port, udp_v4_lookup_longway, udp_v4_mcast_next): Test for ipv6_only_sock. * pfinet/linux-src/net/ipv6/af_inet6.c (sysctl_ipv6_bindv6only): New variable. (inet6_create): Initialize ipv6only field to sysctl_ipv6_bindv6only. * pfinet/linux-src/net/ipv6/ipv6_sockglue.c (ipv6_setsockopt): Test for ipv6_only_sock. (ipv6_setsockopt, ipv6_getsockopt): Support IPV6_V6ONLY case. * pfinet/linux-src/net/ipv6/tcp_ipv6.c (ipv6_rcv_saddr_equal): New inline function. (tcp_v6_get_port): Replace old tests with ipv6_rcv_saddr_equal. (tcp_v6_connect): Test for __ipv6_only_sock. * pfinet/linux-src/net/ipv6/udp_ipv6.c (udv6_rcv_saddr_equal): New inline function. (udp_v6_get_port): Replace old tests with udv6_rcv_saddr_equal. (udpv6_connect, udpv6_sendmsg): Test for __ipv6_only_sock.
* Optimise dir-lookup's second-lockSamuel Thibault2012-12-272-6/+12
| | | | | | | | This should avoid some lock contention. * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Before releasing &np->lock to get &dnp->lock safely, try to lock &dnp->lock directly. * libtreefs/dir-lookup.c (_treefs_s_dir_lookup): Likewise.
* Fix comment styleSamuel Thibault2012-12-171-2/+2
| | | | * console-client/kbd-repeat.c (kbd_repeat_key): Fix comment style.
* Fix double call to pthread_mutex_unlock in diskfs_S_ifsock_getsockaddr.Cyril Roelandt2012-12-171-4/+1
| | | | | * libdiskfs/ifsock.c (diskfs_S_ifsock_getsockaddr): remove a redundant call to pthread_mutex_unlock.
* Fix double call to pthread_mutex_unlock in S_socket_connect.Cyril Roelandt2012-12-171-1/+1
| | | | | | | * pflocal/socker.c (S_socket_connect): fix redundant call to pthread_mutex_unlock. There is no need to hold sock->lock to call connq_connect_cancel, and sock->lock must be taken when leaving the if/else blocks.
* Fix double call to pthread_mutex_unlock in repeat_event().Cyril Roelandt2012-12-171-6/+3
| | | | | * console-client/pc-mouse.c (repeat_event): remove a redundant call to pthread_mutex_unlock.
* Fix double call to pthread_mutex_unlock in kbd_repeat_key().Cyril Roelandt2012-12-171-6/+3
| | | | | * console-client/kbd-repeat.c (kbd_repeat_key): remove a redundant call to pthread_mutex_unlock.
* Fix double call to pthread_mutex_unlock in console_move_mouse().Cyril Roelandt2012-12-171-2/+0
| | | | | * console-client/console.c (console_move_mouse): remove a redundant call to pthread_mutex_unlock().
* Do not expand format name in posix format optionCyril Roelandt2012-12-171-0/+2
| | | | | | | | | This fixes hang of ps -o user * utils/ps.c (parse_opt): When POSIX_FMT is set, do not lookup format name from OUTPUT_FMTS.
* Make io_select return errorsSamuel Thibault2012-12-173-16/+55
| | | | | | | | | | | | | instead of returning 0 and make clients have to actually read the error. This makes implementing "poll" much easier. Based on Svante Signell's patch. * pflocal/io.c (S_io_select): Return error returned by pipe_wait_readable or pipe_wait_writable. * trans/fifo.c (trivfs_S_io_select): Return error returned by pipe_wait_readable or pipe_wait_writable. Return EBADF on bogus access mode. * trans/new-fifo.c (trivfs_S_io_select): Likewise.