mirror of
https://github.com/darlinghq/darlingserver.git
synced 2025-02-17 05:09:12 +00:00
[dtape] Implement TASK_FLAGS_INFO
This commit is contained in:
parent
3a1c30c03e
commit
349e074b10
@ -1,3 +1,6 @@
|
||||
#include "darlingserver/rpc.h"
|
||||
#include "mach/kern_return.h"
|
||||
#include "mach/task_info.h"
|
||||
#include <darlingserver/duct-tape/stubs.h>
|
||||
#include <darlingserver/duct-tape.h>
|
||||
#include <darlingserver/duct-tape/task.h>
|
||||
@ -523,6 +526,23 @@ kern_return_t task_info(task_t xtask, task_flavor_t flavor, task_info_t task_inf
|
||||
return KERN_SUCCESS;
|
||||
};
|
||||
|
||||
case TASK_FLAGS_INFO: {
|
||||
task_flags_info_t info = (task_flags_info_t)task_info_out;
|
||||
mach_msg_type_number_t orig_info_count = *task_info_count;
|
||||
|
||||
if (orig_info_count < TASK_FLAGS_INFO_COUNT) {
|
||||
return KERN_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
info->flags = 0;
|
||||
|
||||
if (task->architecture == dserver_rpc_architecture_x86_64 || task->architecture == dserver_rpc_architecture_arm64) {
|
||||
info->flags = TF_LP64 | TF_64B_DATA;
|
||||
}
|
||||
|
||||
return KERN_SUCCESS;
|
||||
};
|
||||
|
||||
default:
|
||||
dtape_stub_unsafe("unimplemented flavor");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user