diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-20 16:22:52 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-20 16:22:52 -0400 |
commit | 861289845fcf7dbe9b289d9695fe6808ff13be2b (patch) | |
tree | 3fb808464727c13535b1f401bd42f40f278c5768 /system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c | |
parent | f5569153b7df6d141164c27040ef0076732f2da7 (diff) | |
download | apple_cmds-861289845fcf7dbe9b289d9695fe6808ff13be2b.tar.gz apple_cmds-861289845fcf7dbe9b289d9695fe6808ff13be2b.tar.zst apple_cmds-861289845fcf7dbe9b289d9695fe6808ff13be2b.zip |
system_cmds: Update to 880.100.5
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 | 7 |
1 files changed, 4 insertions, 3 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 bfef539..330704d 100644 --- a/system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c +++ b/system_cmds/vm_purgeable_stat.tproj/vm_purgeable_stat.c @@ -22,6 +22,7 @@ * @APPLE_LICENSE_HEADER_END@ */ +#include <System/sys/proc.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> @@ -87,7 +88,7 @@ int get_task_from_pid(int pid, task_t *task) fprintf(stderr, "%s\n", PRIV_ERR_MSG); return -1; } - kr = task_for_pid(mach_task_self(), pid, task); + kr = task_inspect_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; @@ -127,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(pset_priv, tasks, count); + ret = processor_set_tasks_with_flavor(pset_priv, TASK_FLAVOR_INSPECT, tasks, count); if (ret != KERN_SUCCESS) { - fprintf(stderr, "processor_set_tasks() failed: %s\n", mach_error_string(ret)); + fprintf(stderr, "processor_set_tasks_with_flavor() failed: %s\n", mach_error_string(ret)); return -1; } mach_port_deallocate(mach_task_self(), pset_priv); |