- int j;
- mach_msg_type_name_t name;
- mach_msg_ool_ports_descriptor_t *dsc;
-
- dsc = &sstart->ool_ports;
- addr = (vm_offset_t) dsc->address;
+ unsigned int j;
+ mach_vm_offset_t addr;
+ mach_msg_type_name_t user_disp;
+ mach_msg_type_name_t result_disp;
+ mach_msg_type_number_t count;
+ mach_msg_copy_options_t copy_option;
+ boolean_t deallocate;
+
+ volatile mach_msg_ool_ports_descriptor_t *dsc;
+
+ if (differs) {
+ volatile OTHER_OOL_PORTS_DESCRIPTOR *user_dsc;
+
+ user_dsc = (OTHER_OOL_PORTS_DESCRIPTOR *)&daddr->ool_ports;
+ addr = (mach_vm_offset_t)user_dsc->address;
+ count = user_dsc->count;
+ deallocate = user_dsc->deallocate;
+ copy_option = user_dsc->copy;
+ user_disp = user_dsc->disposition;
+ } else {
+ volatile mach_msg_ool_ports_descriptor_t *user_dsc;
+
+ user_dsc = &daddr->ool_ports;
+ addr = CAST_USER_ADDR_T(user_dsc->address);
+ count = user_dsc->count;
+ deallocate = user_dsc->deallocate;
+ copy_option = user_dsc->copy;
+ user_disp = user_dsc->disposition;
+ }
+
+ dsc = &naddr->ool_ports;
+ dsc->deallocate = deallocate;
+ dsc->copy = copy_option;
+ dsc->type = daddr->type.type;
+ dsc->count = count;
+ dsc->address = NULL; /* for now */
+
+ result_disp = ipc_object_copyin_type(user_disp);
+ dsc->disposition = result_disp;