diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-23 11:51:14 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-23 11:51:14 -0400 |
commit | af3b128436e874c2c42b6f154405af8ecf27168c (patch) | |
tree | 0009a24f50f15d38577f04fd65af8d258da4d6f2 /system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c | |
parent | 6049e2ca2a32bf3cd895ac1279495d4bf61c638d (diff) | |
download | apple_cmds-af3b128436e874c2c42b6f154405af8ecf27168c.tar.gz apple_cmds-af3b128436e874c2c42b6f154405af8ecf27168c.tar.zst apple_cmds-af3b128436e874c2c42b6f154405af8ecf27168c.zip |
system_cmds: Fix compilation for lower targets, downgrade lsmp
Diffstat (limited to 'system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c')
-rw-r--r-- | system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c b/system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c index 330704d..e0a0011 100644 --- a/system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c +++ b/system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c @@ -22,11 +22,11 @@ * @APPLE_LICENSE_HEADER_END@ */ -#include <System/sys/proc.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> +typedef char *kobject_description_t[512]; #include <mach/mach.h> #include <mach/mach_types.h> #include <mach/task.h> @@ -88,7 +88,7 @@ int get_task_from_pid(int pid, task_t *task) fprintf(stderr, "%s\n", PRIV_ERR_MSG); return -1; } - kr = task_inspect_for_pid(mach_task_self(), pid, task); + kr = task_for_pid(mach_task_self(), pid, task); if (kr != KERN_SUCCESS) { fprintf(stderr, "Failed to get task port for pid: %d\n", pid); return -1; @@ -128,9 +128,9 @@ int get_system_tasks(task_array_t *tasks, mach_msg_type_number_t *count) vm_deallocate(mach_task_self(), (vm_address_t)psets, (vm_size_t)psetCount * sizeof(mach_port_t)); /* convert the processor-set-priv to a list of tasks for the processor set */ - ret = processor_set_tasks_with_flavor(pset_priv, TASK_FLAVOR_INSPECT, tasks, count); + ret = processor_set_tasks(pset_priv, tasks, count); if (ret != KERN_SUCCESS) { - fprintf(stderr, "processor_set_tasks_with_flavor() failed: %s\n", mach_error_string(ret)); + fprintf(stderr, "processor_set_tasks() failed: %s\n", mach_error_string(ret)); return -1; } mach_port_deallocate(mach_task_self(), pset_priv); |