diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-16 01:48:40 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-16 01:48:40 +0100 |
commit | 4f51b0e104481fb6d337140eeaa51af8c674d236 (patch) | |
tree | 452aacaf7f586e2ccd22bda15a92419d9616065b /hurd | |
parent | 0bc52ecb504401e089e1aa335c56e0c5db6d8e32 (diff) |
Add getting swap information from swapon and procfs
* 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.
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/default_pager.defs | 9 | ||||
-rw-r--r-- | hurd/default_pager_reply.defs | 2 | ||||
-rw-r--r-- | hurd/default_pager_types.h | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/hurd/default_pager.defs b/hurd/default_pager.defs index a97bff2a..14a5ec40 100644 --- a/hurd/default_pager.defs +++ b/hurd/default_pager.defs @@ -98,3 +98,12 @@ routine default_pager_object_set_size( memory_object : memory_object_t; msgseqno seqno : mach_port_seqno_t; object_size_limit : vm_size_t); + +routine default_pager_storage_info( + default_pager : mach_port_t; + out size : vm_size_array_t = + array[] of vm_size_t, dealloc; + out free : vm_size_array_t = + array[] of vm_size_t, dealloc; + out name : data_t); + diff --git a/hurd/default_pager_reply.defs b/hurd/default_pager_reply.defs index 0f9ff86b..02e0e911 100644 --- a/hurd/default_pager_reply.defs +++ b/hurd/default_pager_reply.defs @@ -15,3 +15,5 @@ skip; /* default_pager_paging_storage */ simpleroutine default_pager_object_set_size_reply( reply_port: mach_port_send_once_t; RETURN_CODE_ARG); + +skip; /* default_pager_storage_info */ diff --git a/hurd/default_pager_types.h b/hurd/default_pager_types.h index 7cd14a3d..99ed3fad 100644 --- a/hurd/default_pager_types.h +++ b/hurd/default_pager_types.h @@ -21,8 +21,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define _DEFAULT_PAGER_TYPES_H #include <mach/std_types.h> /* For mach_port_t et al. */ +#include <mach/machine/vm_types.h> /* For vm_size_t. */ #include <device/device_types.h> /* For recnum_t. */ typedef recnum_t *recnum_array_t; +typedef vm_size_t *vm_size_array_t; #endif |