rem: int32 cookie = *_cookie;
add: int32 cookie; user_memcpy(&cookie, _cookie, sizeof(cookie));
context: _kern_get_next_disk_device_id(int32 *_cookie, size_t *neededSize){	if (!_cookie)		return B_BAD_VALUE;	int32 cookie = *_cookie;		partition_id id = B_ENTRY_NOT_FOUND;	KDiskDeviceManager *manager = KDiskDeviceManager::Default();	// get the next device	if (KDiskDevice *device = manager->RegisterNextDevice(&cookie)) {		PartitionRegistrar _(device, true);		id = device->ID();		if (neededSize) {			if (DeviceReadLocker locker = device) {				// get the needed size				UserDataWriter writer;				device->WriteUserData(writer, false);				*neededSize = writer.AllocatedSize();			} else {				id = B_ERROR;			}		}	}	*_cookie = cookie;	return id;}