aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* utils/settrans: improve --chroot functionalityJustus Winter2016-02-054-20/+47
| | | | | | | | | | | | | | | | | Add an option '--chroot-chdir' to settrans and make it chdir to this directory before executing the target program. Also, look up the executable in PATH. With these changes we no longer need to use the shell inside the chroot in the convenience scripts, and hence do not require it to be installed inside the chroot. * utils/fakeroot.sh: Simplify using the new option. * utils/remap.sh: Likewise. * utils/settrans.c (OPT_CHROOT_CHDIR): New constant. (options): New option 'chroot-chdir'. (main): Handle new option. Search for target executable in PATH. * utils/fakeauth.c (main): Likewise.
* exec: remove duplicate function callEsa Peuha2016-02-041-5/+0
| | | | | * exec/main.c (main) Remove second call to trivfs_startup from commit a5d384c.
* procfs: Move setting default parameters to a separate functionSamuel Thibault2016-01-191-3/+8
| | | | | * procfs/main.c (set_default_options): New function (argp_parser): Call `set_default_options'.
* Fix typoSamuel Thibault2016-01-191-1/+1
| | | | * exec/Makefile (targets): Rename to target.
* Also build exec.staticSamuel Thibault2016-01-171-2/+1
| | | | | | Which can be more convenient than using ld.so to boot the Hurd * exec/Makefile (targets): Add exec.static
* Fix gcc signedness warningsSamuel Thibault2016-01-141-1/+1
| | | | | * pfinet/linux-src/include/linux/skbuff.h (__skb_pull): Return unsigned char * instead of char *.
* Fix O_DIRECTORY lookup on trivial translatorsFlavio Cruz2016-01-132-12/+31
| | | | | | | * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): If mustbedir, make sure entry is a directory by retrying "/", or starting the translator and retrying "/". * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
* Fix pfinet crashSamuel Thibault2016-01-031-0/+3
| | | | | | | | | | During rsyslog testsuite, it does happen that threads running schedule_timeout get woken up by something else than the timer. The (local) timer needs to be removed in that case. Let's just always remove it, like Linux does. * pfinet/glue-include/linux/sched.h (schedule_timeout): Remove local timer before returning.
* Make private variables staticSamuel Thibault2016-01-031-2/+2
| | | | * pfinet/timer-emul.c (timers, timer_thread): Make variables static.
* pflocal: Do not abort on too small getopt parameterSamuel Thibault2016-01-031-1/+5
| | | | | * pflocal/socket.c (S_socket_getopt): When *value_len is too small, return EINVAL instead of aborting.
* Add dumb SO_ERROR support to pflocalSamuel Thibault2016-01-031-0/+19
| | | | | | | | pflocal does not currently have asynchronous operations, so we can make SO_ERROR just report 0. * pflocal/socket.c (S_socket_getopt): For `level' SOL_SOCKET and `opt' SO_ERROR, report 0.
* allow pfinet to link using -O0Flavio Cruz2016-01-0244-255/+238
| | | | | This fixes a long list of undefined references when compiling with -O0 by using static instead of extern in header files.
* fix mach-defpager static linkingFlavio Cruz2016-01-011-1/+1
| | | | * mach-defpager/Makefile: Allow multiple definitions for mach-defpager.
* fix compiler warning in hurd/fstestsFlavio Cruz2015-12-311-1/+5
| | | | | * fstests/fstests.c (main): Only declare 'root' when HURDISH_TESTS is defined.
* Drop OTHERLIBS and use LDLIBS exclusivelyFlavio Cruz2015-12-3123-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, OTHERLIBS magically turns -lpthread into the path to the host libpthread.so file, resulting in build issues. LDLIBS does not suffer from this problem and it seems that is already being used in other Makefiles. This patch removes OTHERLIBS entirely from the build system. * Makeconf: Remove references to OTHERLIBS * auth/Makefile: Replace OTHERLIBS with LDLIBS. * boot/Makefile: Likewise. * console/Makefile: Likewise. * exec/Makefile: Likewise. * ext2fs/Makefile: Likewise. * fatfs/Makefile: Likewise. * ftpfs/Makefile: Likewise. * hostmux/Makefile: Likewise. * isofs/Makefile: Likewise. * libhurd-slab/Makefile: Likewise. * nfs/Makefile: Likewise. * nfsd/Makefile: Likewise. * pfinet/Makefile: Likewise. * proc/Makefile: Likewise. * procfs/Makefile: Likewise. * random/Makefile: Likewise. * storeio/Makefile: Likewise. * term/Makefile: Likewise. * tmpfs/Makefile: Likewise. * usermux/Makefile: Likewise.
* Use DEVICE_IMPORTS to include libports/ports.hFlavio Cruz2015-12-313-2/+8
| | | | | | | | | | | | | | | | | | | | | | On Thu, Dec 31, 2015 at 04:28:14PM +0100, Justus Winter wrote: > Quoting Samuel Thibault (2015-12-31 16:11:30) > > Flavio Cruz, on Thu 31 Dec 2015 15:56:31 +0100, wrote: > > > This fixes three compiler warnings about ports_payload_get_name. > > > > > > * devnode/Makefile: Define DEVICE_IMPORTS. > > > * term/Makefile: Likewise. > > > * trans/Makefile: Likewise. > > > > Why not adding them to the corresponding mig-mutate.h? > > Sometimes we don't have a mig-mutate.h, e.g. for most (all?) > translators in trans/. I prefer stuffing that in a .h as well, but I > wouldn't be opposed to just applying the patch, as we use both ways of > mutating the mig types. Agreed. I think only devnode should include it in mig-mutate.h. For term, only some stubs are including mig-mutate.h. For trans, there's no mig-mutate.h at all. Here's the modified patch.
* Define IO_OUTTRAN so that term_on_pty returns a mach_port_tFlavio Cruz2015-12-312-0/+7
| | | | | * libtrivfs/mig-decls.h: Implement trivfs_convert_to_port. * term/mig-mutate.h: Define IO_OUTTRAN.
* Add missing libraries to fix link errorsFlavio Cruz2015-12-306-20/+22
| | | | | | | | | | | | | | This fixes several linking problems I had in my recent cross-compilation of the Hurd. I added missing static libraries and also organized some of the targets for more concise rules. * console-client/Makefile: Add libiohelp.a and libihash.a. * daemons/Makefile: Add libihash.a and libshouldbeinlibc.a. * devnode/Makefile: Add iohelp and ihash to HURDLIBS. * random/Makefile: Likewise. * trans/Makefile: Reorder targets alphabetically and add libiohelp.a and libihash.a. * utils/Makefile: Add libihash.a.
* fix compiler warnings in hurd/nfs and hurd/nfsdFlavio Cruz2015-12-301-1/+1
| | | | | * nfsd/fsys.c (init_filesystems): Use 'm' qualifier instead of 'a' for allocating the name in fscanf call.
* fix compiler warnings in hurd/utilsFlavio Cruz2015-12-296-34/+42
| | | | | | | | | | | | | | | | | | utils: Fix compiler warnings. * utils/rpcscan.c (setup_extract_target): Remove name variable. * utils/rpcscan.c (setup_extract_target): Fix bad initializer. * utils/rpctrace.c (new_send_wrapper, wrap_all_threads, wrap_new_thread, wrap_new_task, traced_spawn): Fix format strings. * utils/rpctrace.c (trace_and_forward): Cast to unsigned int. * utils/rpctrace.c (trace_and_forward): Use memcmp instead of pointer dereferencing to compare structures. * utils/rpctrace.c (wrap_all_threads): Cast to vm_address_t. * utils/rpctrace.c (main): Fix bad initializer. * utils/shd.c (run): Initialize save0. * utils/vminfo.c: Fix format strings. * utils/vmstat.c: Remove PSEP macro and expand the code. * utils/w.c (add_utmp_procs): Remove unused pos variable.
* fix compiler warnings in hurd/transFlavio Cruz2015-12-292-2/+2
| | | | | | | trans: Fix compiler warnings. * trans/mtab.c (mtab_mark_as_seen): Cast idport to hurd_ihash_value_t. * trans/streamio.c (dev_open): Cast name to char *.
* fix compiler warnings in hurd/startupFlavio Cruz2015-12-291-1/+1
| | | | | | startup: Fix compiler warning. * startup/startup.c (do_mach_notify_dead_name): Fix format string.
* fix compiler warnings in hurd/randomFlavio Cruz2015-12-293-19/+18
| | | | | | | | | random: Fix compiler warnings. * random/gnupg-random.c: Use byte instead of char. * random/gnupg-rmd.h (rmd160_mixblock): Use byte instead of char. * random/gnupg-rmd.c (rmd160_mixblock): Likewise. * random/gnupg-rmd.c: Place #ifdef __HURD__ earlier to avoid warnings.
* Include missing header file in hurd/procFlavio Cruz2015-12-291-0/+1
| | | | | | proc: Add missing header file. * proc/mgt: Include missing header file mach/task_notify.h.
* fix compiler warnings in hurd/procfsFlavio Cruz2015-12-293-9/+9
| | | | | | | | procfs: Fix compiler warnings. * include/sys/procfs.h: Change uintptr_t to vm_address_t. * procfs/process.c: Fix format strings. * procfs/rootdir.c: Add missing casts.
* fix compiler warnings in hurd/nfs and hurd/nfsdFlavio Cruz2015-12-294-20/+26
| | | | | | | | | nfs: Fix compiler warnings. * nfs/ops.c (netfs_get_dirents): Initialize buf. * nfsd/nfsd.h: Define cache_handle_array union. * nfsd/cache.c: Use new cache_handle_array union. * nfds/ops.c: Likewise.
* drop the deprecated malloc/free hooks in hurd/mach-defpagerFlavio Cruz2015-12-291-25/+4
|
* fix compiler warnings in hurd/libstoreFlavio Cruz2015-12-293-6/+7
|
* fix compiler warnings in hurd/libshouldbeinlibcFlavio Cruz2015-12-293-7/+8
|
* fix compiler warnings in hurd/libnetfsFlavio Cruz2015-12-291-1/+1
|
* fix compiler warnings in hurd/libihashFlavio Cruz2015-12-291-1/+1
|
* fix compiler warnings in hurd/libftpconnFlavio Cruz2015-12-292-4/+3
|
* fix compiler warnings in hurd/isofsFlavio Cruz2015-12-292-15/+15
| | | | | * isofs/rr.c (rrip_work): Use unsigned char. * isofs/rr.h: Use unsigned char instead of char.
* fix compiler warnings in hurd/libdiskfsFlavio Cruz2015-12-292-3/+3
|
* fix compiler warnings in hurd/isofsFlavio Cruz2015-12-294-11/+17
| | | | | | | | | | * fatfs/dir.c: Use casts to avoid warnings. * fatfs/fat.c: Use unsigned char in fat_{from,to}_epoch. * fatfs/fat.h: Change arguments accordingly. * fatfs/fat.c (fat_read_sblock): Use size_t instead. * fatfs/inode.c (diskfs_cached_lookup_in_dirbuf): Remove err variable. * fatfs/inode.c (diskfs_user_read_node): Don't cast constant. * fatfs/inode.c (write_node): Check for errors in vm_map.
* fix compiler warnings in hurd/console-clientFlavio Cruz2015-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Tue, Dec 29, 2015 at 08:43:24PM +0100, Samuel Thibault wrote: > Flavio Cruz, on Tue 29 Dec 2015 17:35:00 +0100, wrote: > > @@ -663,10 +663,11 @@ update_leds (void) > > | (led_state.num_lock ? 2 : 0) > > | (led_state.caps_lock ? 4 : 0); > > > > - err = device_write_inband (kbd_dev, 0, -1, (void *) leds, 2, &data_cnt); > > + err = device_write_inband (kbd_dev, 0, -1, (void *) leds, 2, > > + (int *) &data_cnt); > > if (!err && data_cnt == 1) > > err = device_write_inband (kbd_dev, 0, -1, (void *) &leds[1], 1, > > - &data_cnt); > > + (int *) &data_cnt); > > } > > } > > > > I'm surprised: if the device_write_inband RPC really wants an int*, why > not making data_cnt an int? That works better. Thanks. console-client: Fix compiler warning. * console-client/pc-kbd.c (update_leds): Replace mach_msg_type_number_t with int.
* fix compiler warnings in hurd/ext2fsFlavio Cruz2015-12-297-21/+21
| | | | | | | | | | | | ext2fs: Fix compiler warnings. * ext2fs/balloc.c: Use unsigned char instead of char. * ext2fs/bitmap.c Use unsigned char for bitmaps. * ext2fs/dir.c: Fix format. * ext2fs/ext2fs.h: Use unsigned char for bitmaps. * ext2fs/ialloc.c: Use unsigned char for bitmaps. Fix format string in ext2_warning. * ext2fs/pager.c: Fix format string in ext2_warning and ext2_error.
* fix compiler warnings in hurd/execFlavio Cruz2015-12-292-3/+3
| | | | | | | exec: Fix compiler warnings. * exec/elfcore.c: Cast arguments to vm_address_t. * exec/main.c: Use %lu in asprintf.
* fix compiler warnings in hurd/daemonsFlavio Cruz2015-12-291-1/+1
| | | | | | daemons: Fix compiler warnings. * daemons/lmail.c: Initialize cached to 0.
* fix compiler warnings in hurd/console-clientFlavio Cruz2015-12-299-25/+41
| | | | | | | | | | | | | | | | console-client: Fix several compiler warnings. * console-client/bdf.c: Use size_t instead of int. * console-client/driver.c: Remove unused variable errstring. * console-client/pc-kbd.c: Cast sc to scancode_x1 before comparing with enum values. * console-client/vga-dynacolor.h: Use an explicit if in reference counting. * console-client/vga-dynafont.c: Use usigned char for bitmaps. * console-client/vga-support.c: Use unsigned char instead of char. * console-client/vga-support.h: Likewise. * console-client/vga.c: Use conchar_attr_equal instead of casting structures to integers. * hurd/console.h: Add conchar_attr_equal to compare conchar_attr_t structures.
* boot: Fix boot.c compiler warning.Flavio Cruz2015-12-291-1/+3
| | | | * boot/boot.c: Compare header without using pointer dereferencing.
* libdiskfs: use ihash for the node cacheJustus Winter2015-12-013-59/+55
| | | | | | | | | | | | | | | | Replace the hand-written hash table in the node cache with libihash. Libihash is a self-tuning hash table, whereas the previous code used a fixed number of buckets. * libdiskfs/Makefile (HURDLIBS): Link to `ihash'. * libdiskfs/diskfs.h (struct node): Remove bucket list, add slot pointer. * libdiskfs/node-cache.c (nodecache): New ihash table replacing the old `nodehash'. (lookup): Drop function. (diskfs_cached_lookup_context): Adapt accordingly. (diskfs_cached_ifind): Likewise. (diskfs_try_dropping_softrefs): Likewise. (diskfs_node_iterate): Likewise.
* ext2fs: keep list of reusable disk cache entriesJustus Winter2015-11-292-31/+53
| | | | | | | | | | | | This avoids a linear scan through the cache. * ext2fs/ext2fs.h (struct disk_cache_info): New field 'next'. * ext2fs/pager.c (disk_cache_hint): Drop. (disk_cache_info_free, disk_cache_info_free_lock): New variables. (disk_cache_info_free_pop, disk_cache_info_free_push): New functions. (disk_cache_init): Adjust slightly. (disk_cache_block_ref): Use new functions. (disk_cache_block_deref): Likewise.
* ext2fs: disable block cache debugging by defaultJustus Winter2015-11-292-5/+5
| | | | | * ext2fs/ext2fs.h: Disable block cache debugging by default. * ext2fs/pager.c: Likewise.
* ext2fs: improve the block cacheJustus Winter2015-11-291-4/+6
| | | | | | * ext2fs/pager.c (disk_cache_block_ref): Improve the cache by using the new lookup and insertion functions that return and use a location pointer.
* libihash: provide a general purpose hash algorithmJustus Winter2015-11-294-87/+102
| | | | | | | * libdiskfs/name-cache.c: Move the Murmur3 algorithm... * libihash/murmur3.c: ... here, and properly attribute the code. * libihash/ihash.h (hurd_ihash_hash32): New prototype. * libihash/Makefile (SRCS): Add new file.
* libihash: fix item insertionJustus Winter2015-11-291-36/+18
| | | | | | * libihash/ihash.c (find_index): Keep track and return the index where we could insert the item. (add_one): Use 'find_index'.
* libihash: generalize the interface to support non-integer keysJustus Winter2015-11-292-12/+84
| | | | | | | | | | | * libihash/ihash.c (hash, compare): New functions that are used throughout libihash to hash and compare keys. (hurd_ihash_set_gki): New function. * libihash/ihash.h (hurd_ihash_fct_hash_t): New type for hash functions. (hurd_ihash_fct_cmp_t): New type for comparison functions. (struct hurd_ihash): New fields for hash and comparison functions. (HURD_IHASH_INITIALIZER_GKI): New static initializer. (hurd_ihash_set_gki): New prototype.
* libihash: fix fast insertion corner caseJustus Winter2015-11-291-0/+1
| | | | | * libihash/ihash.c (hurd_ihash_locp_add): Fix insertion if the key doesn't match.
* libihash: fix ill-devised locp lookup interfaceJustus Winter2015-11-292-35/+15
| | | | | | * libihash/ihash.c (hurd_ihash_locp_find): Return both the item and the slot. * libihash/ihash.h (hurd_ihash_locp_find): Adjust prototype. (hurd_ihash_locp_value): Remove function.