aboutsummaryrefslogtreecommitdiff
path: root/procfs
Commit message (Collapse)AuthorAgeFilesLines
* Add getting swap information from swapon and procfsSamuel Thibault2016-03-162-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | * hurd/default_pager.defs (default_pager_storage_info): New RPC. * hurd/default_pager_reply.defs: Skip default_pager_storage_info RPC. * hurd/default_pager_types.h: Include <mach/machine/vm_types.h>. (vm_size_array_t): New type. * mach-defpager/priv.h (part): Add `name' field. * mach-defpager/default_pager.c (new_partition): Allocate and fill `part->name' field. Free it on error. (destroy_paging_partition): Free `part->name' field. (S_default_pager_storage_info): New function. * procfs/Makefile (SRCS): Add default_pagerUser.c. * procfs/rootdir.c: Include "default_pager_U.h". (rootdir_gc_swaps): New function. (rootdir_entries): Add "swaps" entry. * sutils/swapon.c: Include <argz.h> (show): New variable. (options): Add --show/-S option. (def_pager, dev_master): New variables (swaponoff): Move getting `def_pager' to... (get_def_pager): ... new function. (main): Support 'S' option. * trans/proxy-defpager.c (S_default_pager_storage_info): New function.
* procfs: adapt to kernel interface changeJustus Winter2016-02-231-5/+4
| | | | | | | procfs makes use of the debug interface which is subject to change. * procfs/rootdir.c (rootdir_gc_slabinfo): The flag CACHE_FLAGS_NO_RECLAIM is no longer used.
* Fix function nameSamuel Thibault2016-02-141-2/+2
| | | | | * procfs/main.c (set_default_options): Rename to set_compatibility_options. (argp_parser): Update call accordingly.
* 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'.
* Drop OTHERLIBS and use LDLIBS exclusivelyFlavio Cruz2015-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix compiler warnings in hurd/procfsFlavio Cruz2015-12-292-7/+7
| | | | | | | | 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.
* Make procfs accept none or proc as "device"Samuel Thibault2015-09-081-0/+6
| | | | | | | This allows "mount none /proc -t proc" to work. * procfs/main.c (argp_parser): On ARGP_KEY_ARG, accept and ignore "none" and "proc".
* procfs: fix runtime option parsingJustus Winter2015-04-071-1/+1
| | | | | * procfs/main.c (netfs_runtime_argp): Actually use the runtime option parser.
* procfs: fix argument parsingJustus Winter2015-04-071-3/+3
| | | | * procfs/main.c (argp_parser): Fix argument parsing.
* procfs: Fix typos in comments (found by codespell)Stefan Weil2015-01-034-5/+5
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Revert "Make sure to free content dir in procfs"Samuel Thibault2014-12-261-8/+1
| | | | This reverts commit 5fe615a4d66f4dea48812ed9e4f250010a8f9298.
* Make sure to free content dir in procfsLancelot SIX2014-12-261-1/+8
| | | | | In procfs/netfs.c:netfs_get_dirents, make sure to free the memory allocated with the "get_contents" callback of nodes.
* Fix coding styleSamuel Thibault2014-12-061-1/+1
|
* procfs: do not hard-code the default argument valuesJustus Winter2014-11-211-3/+3
| | | | | * procfs/main.c (common_options): If possible, do not hard-code the default values.
* Add proc_set_init_task, make runsystem pid 1Justus Winter2014-11-211-2/+7
| | | | | | | | | | | | | | | | | * hurd/process.defs (proc_set_init_task): New procedure. * hurd/process_reply.defs (proc_set_init_task): Likewise. * hurd/process_request.defs (proc_set_init_task): Likewise. * include/pids.h: Add HURD_PID_INIT as 1, adjust others accordingly. * init/init.c (start_child): Register the child task. * proc/proc.h (init_proc): New variable. (create_startup_proc): Rename to create_init_proc. * proc/main.c (main): Create placeholder proc object for pid 1. * proc/mgt.c: Use init_proc instead of startup_proc, as the former is the new root of the process tree. (create_startup_proc): Rename to create_init_proc. (S_proc_set_init_task): New function. * doc/hurd.texi (Server Bootstrap): Update accordingly. * procfs/main.c: Do not hard-code kernel pid, use pids.h instead.
* Make procfs appear in /proc/mountsSamuel Thibault2014-11-111-0/+12
| | | | | | d-i needs to be able to check whether /proc is mounted or not. * procfs/main.c (netfs_get_source): New function.
* procfs: reorganize rootdir.cJustus Winter2014-09-291-76/+77
| | | | | * procfs/rootdir.c: Move the translator linkage code to the appropriate location.
* procfs: generalize the translator linkage codeJustus Winter2014-09-291-20/+42
| | | | | | | | | | | | | | | | | Generalize the translator linkage code previously introduced for the `mounts' node. * procfs/rootdir.c (struct procfs_translated_node_ops): New specialized node operations structure for translated nodes. (rootdir_mounts_make_node): Generalize and rename to rootdir_make_translated_node. Also, pass the entry_hook to procfs_make_node so that... (rootdir_mounts_get_translator): ... can be generalized to rootdir_translated_node_get_translator and read the argz vector from the hooked structure. (ROOTDIR_DEFINE_TRANSLATED_NODE): New convenience macro to define translated nodes. (rootdir_entries): Use the new code for the `mounts' node.
* procfs: do not test whether /hurd/mtab existsJustus Winter2014-09-291-10/+0
| | | | | | | | Now that procfs is merged into the Hurd repository we can just assume that the mtab translator exists. * procfs/rootdir.c (rootdir_mounts_exists): Drop function. (rootdir_entries): Adjust accordingly.
* procfs: implement /proc/filesystemsJustus Winter2014-09-291-1/+60
| | | | | * procfs/rootdir.c (rootdir_gc_filesystems): New function. (rootdir_entries): Use the new function to implement /proc/filesystems.
* procfs: implement /proc/N/mapsJustus Winter2014-09-291-1/+103
| | | | | | | Fixes https://savannah.gnu.org/bugs/?32770 . * procfs/process.c (process_file_gc_maps): New function. (entries): Use the new function to implement /proc/N/maps.
* hurd: add symbolic name for the mtab translatorJustus Winter2014-09-221-5/+2
| | | | | | * hurd/paths.h (_HURD_MTAB): New macro. * procfs/rootdir.c (rootdir_mounts_get_translator): Use the new macro. (rootdir_mounts_exists): Likewise.
* procfs: fix typo in commentJustus Winter2014-09-181-1/+1
| | | | * procfs/process.c (process_stat_make_node): Fix typo in comment.
* Add mach_debug defs rulesDavid Michael2014-06-171-3/+0
| | | | | | * Makeconf (mach_debug_defs_names,mach_debug_defs): New variables. * Makeconf: Add rule to generate local $(mach_debug_defs) files. * procfs/Makefile: Remove vpath for mach_debug defs.
* Prepare the procfs translator to be merged into the Hurd sourcesJustus Winter2014-06-1518-0/+2779
Move the procfs translator to its own subdirectory 'procfs'. This is the last commit to this repository. Development of the procfs translator will continue in the main Hurd repository. * procfs/Makefile: Replace the standalone Makefile with the one from the Debian packaging repository.