diff options
Diffstat (limited to 'backends/hostmem-file.c')
-rw-r--r-- | backends/hostmem-file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index 78f058dee2..7a34e25c43 100644 --- a/backends/hostmem-file.c +++ b/backends/hostmem-file.c @@ -43,7 +43,7 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp) { HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend); #ifdef CONFIG_POSIX - gchar *path; + gchar *name; #endif if (!backend->size) { @@ -58,14 +58,14 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp) error_setg(errp, "-mem-path not supported on this host"); #else backend->force_prealloc = mem_prealloc; - path = object_get_canonical_path(OBJECT(backend)); + name = host_memory_backend_get_name(backend); memory_region_init_ram_from_file(&backend->mr, OBJECT(backend), - path, + name, backend->size, fb->align, (backend->share ? RAM_SHARED : 0) | (fb->is_pmem ? RAM_PMEM : 0), fb->mem_path, errp); - g_free(path); + g_free(name); #endif } |