diff --git a/plugins/amdgpu/amdgpu_plugin.c b/plugins/amdgpu/amdgpu_plugin.c index ac81113b1..c7eb210a8 100644 --- a/plugins/amdgpu/amdgpu_plugin.c +++ b/plugins/amdgpu/amdgpu_plugin.c @@ -1132,7 +1132,6 @@ int amdgpu_restore_init(void) int ret; unsigned char *buf; int num_handles = 0; - char img_path[PATH_MAX]; CriuRenderNode *rd = NULL; CriuKfd *e = NULL; @@ -1154,7 +1153,7 @@ int amdgpu_restore_init(void) ret = read_fp(img_fp, buf, img_size); if (ret) { - pr_perror("Unable to read from %s", img_path); + pr_perror("Unable to read from %s", dir->d_name); fclose(img_fp); xfree(buf); return ret; @@ -1163,7 +1162,7 @@ int amdgpu_restore_init(void) fclose(img_fp); e = criu_kfd__unpack(NULL, img_size, buf); if (!e) { - pr_err("Unable to unpack %s!\n", img_path); + pr_err("Unable to unpack %s!\n", dir->d_name); xfree(buf); return -EINVAL; } @@ -1184,7 +1183,7 @@ int amdgpu_restore_init(void) ret = read_fp(img_fp, buf, img_size); if (ret) { - pr_perror("Unable to read from %s", img_path); + pr_perror("Unable to read from %s", dir->d_name); fclose(img_fp); xfree(buf); return ret; @@ -1193,7 +1192,7 @@ int amdgpu_restore_init(void) fclose(img_fp); rd = criu_render_node__unpack(NULL, img_size, buf); if (!rd) { - pr_err("Unable to unpack %s!\n", img_path); + pr_err("Unable to unpack %s!\n", dir->d_name); xfree(buf); return -EINVAL; }