rem: char filename[SYS_MAX_PATH_LEN+1]; if (user_strlcpy(filename, _filename, SYS_MAX_PATH_LEN) >= SYS_MAX_PATH_LEN) return B_NAME_TOO_LONG;
add: char filename[B_PATH_NAME_LENGTH]; status_t error = ddm_strlcpy(filename, _filename, B_PATH_NAME_LENGTH); if (error) return error;
context: _kern_find_partition(const char *_filename, size_t *neededSize){	if (!_filename)		return B_BAD_VALUE;	char filename[SYS_MAX_PATH_LEN+1];	if (user_strlcpy(filename, _filename, SYS_MAX_PATH_LEN) >= SYS_MAX_PATH_LEN) 				return B_NAME_TOO_LONG;	partition_id id = B_ENTRY_NOT_FOUND;	KDiskDeviceManager *manager = KDiskDeviceManager::Default();	// find the partition	if (KPartition *partition = manager->RegisterPartition(filename)) {		PartitionRegistrar _(partition, true);		id = partition->ID();		if (neededSize) {			// get and lock the partition's device			KDiskDevice *device = manager->RegisterDevice(partition->ID());			if (!device)				return B_ENTRY_NOT_FOUND;			PartitionRegistrar _2(device, true);			if (DeviceReadLocker locker = device) {				// get the needed size				UserDataWriter writer;				device->WriteUserData(writer, false);				*neededSize = writer.AllocatedSize();			} else				return B_ERROR;		}	}	return id;}