aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Use -L instead of -Wl,-rpath-linkSamuel Thibault2015-11-291-3/+3
| | | | | | | | | | The latter does not work for libpthread.a which passes -lihash, which would find the installed libihash.a instead of the just-compiled one. * Makeconf (rpath): Remove, replaced by... (lpath): ... new variable. (link-executable, $(libname).so.$(hurd-version)): Use $(lpath) instead of $(rpath).
* Add missing menusSamuel Thibault2015-11-291-0/+12
|
* Fix undefined referenceSamuel Thibault2015-11-291-2/+1
| | | | | * doc/hurd.texi (devnode): Do not reference not-yet-existing eth-multiplexer node.
* Add devnode documentationSamuel Thibault2015-11-291-1/+55
| | | | * doc/hurd.texi (devnode): Add section.
* Add libhurd-slabSamuel Thibault2015-11-294-1/+891
| | | | | * libhurd-slab: New directory * Makefile (lib-subdirs): Add libhurd-slab.
* Add devnode translatorSamuel Thibault2015-11-296-0/+482
| | | | | * devnode: New directory * Makefile (prog-subdirs): Add devnode.
* libihash: prefer performance degradation over failureJustus Winter2015-11-121-1/+11
| | | | | * libihash/ihash.c (hurd_ihash_add): Add the item even though we are above the load factor if resizing failed.
* libihash: optimize lookup-or-insert operationsJustus Winter2015-11-062-1/+129
| | | | | | | | | | | | | | | | 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.
* libihash: add hurd_ihash_value_validJustus Winter2015-11-062-2/+8
| | | | | * libihash/ihash.h (hurd_ihash_value_valid): New function. * libihash/ihash.c (index_empty): Use hurd_ihash_value_valid.
* random: satisfy arbitrarily-sized readsJustus Winter2015-11-061-11/+30
| | | | * random/random.c (trivfs_S_io_read): Satisfy arbitrarily-sized reads.
* random: use /servers/startup to register for shutdown notificationsJustus Winter2015-11-061-9/+4
| | | | | * random/random.c (arrange_shutdown_notification): Use the new way to contact the startup server.
* random: improve error handlingJustus Winter2015-11-061-9/+13
| | | | | | * random/random.c (arrange_shutdown_notification): Improve error handling. (main): Display warning if arranging the shutdown notification failed.
* random: fix odd formattingJustus Winter2015-11-061-8/+3
| | | | * random/random.c (trivfs_append_args): Fix odd formatting.
* Remove unused variablesJustus Winter2015-11-064-6/+0
| | | | | | | * 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.
* libtrivfs: remove deprecated static class vectorsJustus Winter2015-11-036-81/+0
| | | | | | | | | | | | | 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.
* pfinet: fix sanity check at translator startup timeJustus Winter2015-11-031-2/+4
| | | | * pfinet/main.c (main): Properly iterate over `pfinet_protid_portclasses'.
* GNU Hurd 0.7Thomas Schwinge2015-10-312-4/+4
| | | | | * configure.ac (AC_INIT): Set version to 0.7. * NEWS: Finalize for 0.7.
* pflocal: avoid building the interrupt serverJustus Winter2015-10-291-1/+0
| | | | * pflocal/io.c: Do not needlessly include `interrupt_S.h'.
* hurd: fix type of in-translation functionJustus Winter2015-10-291-1/+1
| | | | | * hurd/hurd_types.defs (interrupt_t): Fix type of in-translation function.
* trans: improve demuxersJustus Winter2015-10-292-8/+21
| | | | | | | | | | | 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.
* Make fakerooted access() return real accessSvante Signell2015-10-201-6/+1
| | | | | | | | 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.
* Make dir_lookup create files with user permissions enabledSamuel Thibault2015-10-121-12/+12
| | | | | | | 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.
* Make netfs_S_io_reauthenticate handle allocation errorsSamuel Thibault2015-10-111-1/+11
| | | | | * libnetfs/io-reauthenticate.c (netfs_S_io_reauthenticate): Loop when netfs_make_protid fails with EINTR, return error when it fails otherwise.
* Drop duplicate port deallocationSamuel Thibault2015-10-112-2/+4
| | | | | | | | | 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.
* Add missing null checks in libshouldbeinlibcJames Clarke2015-10-052-5/+6
| | | | | | | | | | | | 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.
* Update NEWS fileJustus Winter2015-10-051-0/+18
|
* libdiskfs: fflush stdout when pausingJustus Winter2015-10-051-0/+1
| | | | | * libdiskfs/boot-start.c (diskfs_start_bootstrap): fflush stdout when pausing for /hurd/startup.
* Minor documentation changesJoshua Branson2015-09-292-17/+29
| | | | | | | | * .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.
* libtrivfs: deprecate old apiJustus Winter2015-09-271-4/+7
| | | | | | | | * 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.
* libtrivfs: optimize the object lookup codeJustus Winter2015-09-271-84/+52
| | | | | | | * 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.
* trans/proxy-defpager: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-271-3/+10
| | | | | | | | | | | | | | | | | | | | 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.
* trans/passwd: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-271-21/+27
| | | | | | | | | | | | | | | | | 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.
* trans/new-fifo: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-271-14/+14
| | | | | | | | | | | | | | | | | 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.
* trans/magic: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-271-5/+11
| | | | | | | | | | | | | | | | | | | 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.
* trans/ifsock: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-271-7/+0
| | | | | | | | | | | | | | | | | 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.