summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-05exec: fix receiver lookupJustus Winter
* exec/Makefile (exec_startup-MIGSFLAGS): New variable. * exec/execmutations.h: Add mutators for exec_startup_t. * exec/mig-decls.h: New file. * exec/priv.h (bootinfo_t): New type declaration to appease mig. * exec/exec.c (S_exec_startup_get_info): Fix receiver lookup.
2014-04-05hurd: add a new type for the exec_startup protocolJustus Winter
* hurd/hurd_types.defs (exec_startup_t): New type. * hurd/hurd_types.h (exec_startup_t): Likewise. * hurd/exec_startup.defs: Honor EXEC_STARTUP_IMPORTS. (exec_startup_get_info): Use the new type as receiver.
2014-04-04Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2014-04-04Fix spurious unlock on errorSamuel Thibault
Thanks Cyril Roelandt for finding the issue. * libdiskfs/dir-renamed.c (diskfs_rename_dir): On diskfs_lookup error, set fnp to NULL to avoid unlocking it spuriously.
2014-04-02libpager: fix receiver lookupsJustus Winter
Previously, the receiver lookup was done manually in all the server functions. Use mig translator functions instead. * libpager/mig-decls.h: New file. * libpager/mig-mutate.h: Likewise. * libpager/Makefile (MIGSFLAGS): Include mig-mutate.h. * libpager/chg-compl.c: Fix receiver lookups. * libpager/data-request.c: Likewise. * libpager/data-return.c: Likewise. * libpager/data-unlock.c: Likewise. * libpager/lock-completed.c: Likewise. * libpager/object-init.c: Likewise. * libpager/object-terminate.c: Likewise. * libpager/stubs.c: Likewise. * libpager/seqnos.c (_pager_update_seqno): Move the actual functionality... (_pager_update_seqno_p): ... into a new function that can be called with a pointer to struct pager. * libpager/priv.h (_pager_update_seqno_p): New declaration.
2014-03-26Handle fonts with multiple-of-8 bbox widthSamuel Thibault
* console-client/vga-dynafont.c (dynafont_new): When the bbox width of the font is a multiple of 8, set width to 8. Reject any other value than 8 or 9 with EINVAL.
2014-03-26Fix setting LGE flagSamuel Thibault
* console-client/vga-support.c (vga_set_font_width): Fix setting the `VGA_ATTR_MODE_LGE' flag.
2014-03-26Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2014-03-26Align VGA buffersSamuel Thibault
Some "hardware" (such as kvm on linux 3.2) would hang when transferring between video memory and unaligned main memory. This also allows better optimized transfers anyway. Thanks Petter Reinholdtsen for the report and patient tests. * console-client/vga-support.c (vga_state): Force maximum alignment of `videomem' and `fontmem' fields.
2014-03-25mach-defpager: replace the magic typecast with a hash tableJustus Winter
Previously, the mach-defpager used a "magic typecast" for object lookups. It renamed the port to the address of the associated object, and upon receiving a message it would cast the port name back to a pointer. While this might seem like an optimization, it actually makes the port handling in the kernel less efficient. Ports with small continuous names are stored in an array, while other ports get spilled in a splay tree. Replace the linked list of default_port_t objects with a hash table. Do not rename the ports, rather use the hash table to lookup objects associated with ports. * mach-defpager/default_pager.c (struct pager_port): Replace queue with hash table, remove count, move type declaration to priv.h. (pager_port_list_init): Adjust accordingly. (pager_port_list_insert): Likewise. (pager_port_list_delete): Likewise. (destroy_paging_partition): Replace queue_iterate with HURD_IHASH_ITERATE. (S_default_pager_objects): Likewise. (S_default_pager_object_pages): Likewise. (seqnos_memory_object_create): Do not rename the port but store it in the hash table. (S_default_pager_object_create): Likewise. * mach-defpager/priv.h (struct dstruct): Add fast-removal pointer. (pnameof): Remove obsolete macro definition. (dnameof): Likewise. * mach-defpager/mig-decls.h (begin_using_default_pager): Replace the magic typecast with a hash table lookup. * mach-defpager/Makefile (HURDLIBS): Add ihash.
2014-03-25mach-defpager: fix local includesJustus Winter
* mach-defpager/default_pager.c: Fix local includes. * mach-defpager/main.c: Likewise. * mach-defpager/setup.c: Likewise.
2014-03-25mach-defpager: fix receiver lookupsJustus Winter
Previously, the receiver lookup was done manually in all the server functions. Use mig translator functions instead. * mach-defpager/mig-decls.h: New file. * mach-defpager/mig-mutate.h: Likewise. * mach-defpager/Makefile (MIGSFLAGS): Include mig-mutate.h. * mach-defpager/mach-defpager.c: Fix receiver lookups, move type definitions... * mach-defpager/priv.h: ... here, so that they can be used in mig-decls.h.
2014-03-25hurd: fix receiver type, honor DEFAULT_PAGER_IMPORTSJustus Winter
* hurd/default_pager.defs: Honor DEFAULT_PAGER_IMPORTS. (default_pager_object_set_size): Fix receiver type.
2014-03-25libdiskfs: fix string terminationJustus Winter
Found using the Clang Static Analyzer. * libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Fix string termination.
2014-03-25isofs: also copy the terminating zero in read_symlink_hookJustus Winter
* isofs/inode.c (read_symlink_hook): Use memcpy, also copy terminating zero.
2014-03-21libpager: fix potential deadlockJustus Winter
This patch releases the interlock before doing an rpc call, analogous to 901c61a1d25e7c8963e51012760a82730eda1910. * libpager/pager-attr.c (pager_change_attributes): Release interlock before calling memory_object_change_attributes, to let the callbacks take it.
2014-03-21libpager: fix comment of pager_change_attributesJustus Winter
* libpager/pager-attr.c: Fix comment. * libpager/pager.h: Likewise.
2014-03-20Make bz2 and gz support optionalGabriele Giacone
* config.make.in (HAVE_LIBBZ2, HAVE_LIBZ): New variables. * configure.ac (--without-libbz2, --without-libz): New options. * ext2fs/Makefile (OTHERLIBS): Make -lbz2 and -lz optional. * fatfs/Makefile (OTHERLIBS): Likewise. * isofs/Makefile (OTHERLIBS): Likewise. * libstore/Makefile (maybe_part): Remove variable. (store-types): Add part, bunzip2 and gunzip support conditionnally. (LDLIBS): Make -lbz2 and -lz optional. (OBJS): Add GUNZIP_OBJS and BUNZIP2_OBJS optional.
2014-03-16Fix handling of console readlink errorsSamuel Thibault
* console-client/trans.c (netfs_attempt_lookup): Look for errors returned by `readlink' before allocating a node. (netfs_attempt_readlink): Look for errors returned by `readlink'.
2014-03-16Fix vcs_readlink propagating error returned by console_current_idSamuel Thibault
* console-client/current-vcs.c (vcs_readlink): Return error returned by `console_current_id' as a negative value.
2014-03-16Fix crash on accessing vcs without a console being activeSamuel Thibault
* console-client/current-vcs.c (vcs_readlink): Return error as negative values. (vcs_read): Convert errors returned by vcs_readlink before returning them.
2014-03-16Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2014-03-16Fix crash on opening /dev/kbd or mouse without any console being activeSamuel Thibault
* console-client/console.c (console_switch_away): Check for `active_vcons` being NULL before saving the currently active console.
2014-03-12mach-defpager: silently ignore requests to page to active partitionJustus Winter
Currently, if mach-defpager is asked to page to an already active partition, it ignores this request and returns success. It does, however, print a message about this to stdout. This message might indicate to the user that there is some kind of a problem with the configuration of the machine, even though the code in new_partition clearly does not consider it an error to do such an request. * mach-defpager/default_pager.c (new_partition): Do not print a message if requested to page to an already active partition.
2014-03-12mach-defpager: fix type of size argumentsJustus Winter
* mach-defpager/default_pager.c (new_partition): Fix type of bsize. * mach-defpager/file_io.h (page_read_file_direct): Fix type of size argument. (page_write_file_direct): Likewise. * mach-defpager/setup.c (page_read_file_direct): Likewise. (page_write_file_direct): Likewise.
2014-03-12mach-defpager: fix warnings about uninitialized variablesJustus Winter
* mach-defpager/default_pager.c (S_default_pager_objects): Initialize address, size-pairs to 0. (S_default_pager_object_pages): Likewise. * mach-defpager/kalloc.c (kget_space): Likewise.
2014-03-12mach-defpager: fix warning about uninitialized variableJustus Winter
Previously, failure to look up the given partition was detected after the loop by checking whether the loop ran over all existing partitions. Initialize part to NULL and check for that instead. This retains the behavior, but expresses it in a way the compiler understands better. * mach-defpager/default_pager.c (destroy_paging_partition): Initialize part to NULL and check for it still being NULL after the loop.
2014-03-12mach-defpager: fix error handling in S_default_pager_object_set_sizeJustus Winter
Fix a compiler warning about kr being potentially being uninitialized. * mach-defpager/default_pager.c (S_default_pager_object_set_size): Initialize kr.
2014-03-12mach-defpager: add and use synchronized_printf for dprintfJustus Winter
* mach-defpager/default_pager.c (synchronized_printf): New function. (printf_lock): Move to synchronized_printf. (dprintf): Use synchronized_printf. (ddprintf): Likewise.
2014-03-12mach-defpager: fix warnings about unused variablesJustus Winter
* mach-defpager/default_pager.c (pager_alloc): Declare variables only when needed. (dealloc_direct): Remove unused variables. (seqnos_memory_object_terminate): Remove unused variable, adjust ddprintfs accordingly. (seqnos_memory_object_data_write): Remove unused variable.
2014-03-12mach-defpager: remove comments around form feedsJustus Winter
Form feed characters (\f) are whitespace and are treated as such by c compilers. There is no need to enclose them in comments. * mach-defpager/default_pager.c: Remove comments around form feeds.
2014-03-01auth: improve the mig mutator functionsJustus Winter
Previously, the mig mutator function auth_port_to_handle was defined in auth.c (fakeauth.c), preventing it from being inlined into the mig-generated server functions. Put it in mig-decls.h instead. Rename authmutations.h to mig-mutate.h, auth_mig.h to mig-decls.h. This is the naming convention used for pflocal. * auth/auth.h: New file. * auth/auth_mig.h: Rename to mig-decls.h, add copyright notice, define mutator functions. * auth/authmutations.h: Rename to mig-mutate.h, restore copyright notice, adjust accordingly. * auth/auth.c: Include auth.h, remove auth_port_to_handle. * utils/fakeauth.c: Likewise. * auth/Makefile: Adjust accordingly. * utils/Makefile: Likewise.
2014-03-01trans/ifsock: fix receiver lookupJustus Winter
* trans/Makefile: Add ifsock-MIGSFLAGS. * trans/ifsock.c (S_ifsock_getsockaddr): Fix receiver lookup.
2014-02-28term: fix receiver lookups in the term server functionsJustus Winter
* term/mig-mutate.h: Define TERM_IMPORTS. * term/Makefile: Set term-MIGSFLAGS. * term/users.c: Fix receiver lookups in the term server functions.
2014-02-28term: fix receiver lookups in the tioctl server functionsJustus Winter
* term/mig-mutate.h: New file. * term/Makefile: Set tioctl-MIGSFLAGS. * term/ptyio.c: Fix receiver lookups in the tioctl server functions. * term/users.c: Likewise.
2014-02-27pfinet: fix receiver lookups in iioctl-ops.cJustus Winter
* pfinet/iioctl-ops.c: Fix receiver lookups. * pfinet/mig-mutate.h: Add IIOCTL_IMPORTS. * pfinet/Makefile: Set iioctl-MIGSFLAGS.
2014-02-27hurd: add IIOCTL_IMPORTSJustus Winter
* hurd/iioctl.defs: Add IIOCTL_IMPORTS.
2014-02-25libtrivfs: improve the mig mutator functionsJustus Winter
Previously, the mig mutator functions were in migsupport.c, preventing them from being inlined into the mig-generated server functions. Put them in mig-decls.h instead. Rename mutations.h to mig-mutate.h. This is the naming convention used for pflocal. * libtrivfs/fsmutations.h: Rename to mig-mutate.h, adopt imports. * libtrivfs/Makefile: Adopt accordingly. * libtrivfs/migsupport.c: Rename to mig-decls.h. * libtrivfs/trivfs.h: Move dynamic classes/buckets declarations to mig-decls.h, remove superfluous imports. * exec/execmutations.h: Fix import. * pfinet/mig-mutate.h: Likewise. * trans/Makefile: Likewise.
2014-02-25pfinet: improve the mig mutator functionsJustus Winter
Previously, the mig mutator functions were in misc.c, preventing them from being inlined into the mig-generated server functions. Put them in mig-decls.h instead. Rename mutations.h to mig-mutate.h. This is the naming convention used for pflocal. * pfinet/mutations.h: Rename to mig-mutate.h, adopt imports. * pfinet/Makefile: Adopt accordingly. * pfinet/mig-decls.h: New file. * pfinet/misc.c: Move mutator functions to mig-decls.h. * pfinet/pfinet.h: Move type declarations to mig-decls.h, remove mutator declarations. * pfinet/iioctl-ops.c: Include mig-decls.h.
2014-02-25libdiskfs: fix receiver lookups in fsys server functionsJustus Winter
* libdiskfs/diskfs.h (struct diskfs_control): New declaration. (diskfs_begin_using_control_port): New declaration and function. (diskfs_end_using_control_port): Likewise. * libdiskfs/fsmutations.h: Add translation functions. * libdiskfs/priv.h (control_t): New type declaration for mig. * libdiskfs/boot-start.c: Fix receiver lookups. * libdiskfs/fsys-getfile.c: Likewise. * libdiskfs/fsys-getroot.c: Likewise. * libdiskfs/fsys-goaway.c: Likewise. * libdiskfs/fsys-options.c: Likewise. * libdiskfs/fsys-syncfs.c: Likewise.
2014-02-25libnetfs: fix receiver lookups in fsys server functionsJustus Winter
* mutations.h: Add translation functions. * netfs.h (struct netfs_control): New declaration. * priv.h: Define translation functions. * fsys-get-options.c: Fix receiver lookups. * fsys-getroot.c: Likewise. * fsys-goaway.c: Likewise. * fsys-set-options.c: Likewise. * fsys-syncfs.c: Likewise. * fsysstubs.c: Likewise.
2014-02-25New RPCs, fix buildJustus Winter
2014-02-25trans/mtab: do not map unknown source strings to "none"Justus Winter
Previously, map_device_to_path mapped unknown device strings to "none". Return a copy of the original source string instead so that e.g. nfs mount point points are properly handled. * trans/mtab.c (map_device_to_path): Do not map unknown source strings to "none".
2014-02-25tmpfs: set diskfs_disk_name to "none"Justus Winter
By default diskfs_disk_name is returned as the source of libdiskfs-based translators. Hurds fstab allows multiple entries with the mnt_fsname being "none". * tmpfs/tmpfs.c (diskfs_disk_name): Set to "none".
2014-02-25trans/mtab: ignore translators that do not implement file_get_sourceJustus Winter
Previously, the mtab translator would guess the source of a filesystem translator from its last argument. This made all kinds of non-filesystem translators appear in /proc/mounts, causing severe problems due to umount --all removing vital passive translator records. Fix this by ignoring all translators that do not explicitly implement file_get_source. * trans/mtab.c (mtab_populate): Ignore translators that do not implement file_get_source.
2014-02-25nfs: implement netfs_get_sourceJustus Winter
Implement netfs_get_source so that nfs translators show up in /proc/mounts. * nfs/main.c (netfs_get_source): New function.
2014-02-25hurd: fix the get-children and get-source proceduresJustus Winter
* hurd/fs.defs: Add file_get_children and file_get_source. * hurd/fsys.defs: Remove fsys_get_children and fsys_get_source. * libdiskfs/fsys-get-children.c: Rename and adapt accordingly. * libdiskfs/fsys-get-source.c: Likewise. * libnetfs/fsys-get-children.c: Likewise. * libnetfs/fsys-get-source.c: Likewise. * libtrivfs/fsys-get-children.c: Likewise. * libtrivfs/fsys-get-source.c: Likewise. * libdiskfs/diskfs.h: Adapt prototype and comment. * libnetfs/netfs.h: Likewise. * libtrivfs/trivfs.h: Likewise. * libdiskfs/get-source.c: Adapt default implementation, provide diskfs_disk_name by default. * libnetfs/netfs.h: Adapt default implementation. * libtrivfs/get-source.c: Likewise. * libdiskfs/Makefile: Adapt accordingly. * libnetfs/Makefile: Likewise. * libtrivfs/Makefile: Likewise. * trans/symlink.c: Likewise. * trans/mtab.c: Likewise.
2014-02-25mach-defpager: improve the default_pager_demux_object functionJustus 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. * mach-defpager/default_pager.c (default_pager_demux_object): Improve the demuxer function.
2014-02-25mach-defpager: add function mig_reply_setupJustus Winter
Currently, mig_reply_setup is not provided by libmachuser or the glibc. Provide it locally. * mach-defpager/default_pager.c (mig_reply_setup): New function.
2014-02-25mach-defpager: fix definition of seqnos_memory_object_data_unlockJustus Winter
* mach-defpager/default_pager.c (seqnos_memory_object_data_unlock): Fix function arguments.