}
static int
-resize_and_map(int fd, void *addr, size_t len)
+resize_and_map(int fd, const char *path, void *addr, size_t len)
{
- char path[PATH_MAX];
void *map_addr;
if (eal_file_truncate(fd, len)) {
if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))
goto fail;
- if (resize_and_map(fd, data, mmap_len))
+ if (resize_and_map(fd, path, data, mmap_len))
goto fail;
}
ma->addr = data;
if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))
goto fail;
- if (resize_and_map(fd, data, mmap_len))
+ if (resize_and_map(fd, path, data, mmap_len))
goto fail;
/* store our new memory area */