bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME
MAX_SNAPSHOT_VMNAME is a macro used to set the size of a character buffer that stores a filename or the path to a file - this file is used by the save/restore feature. Since the file doesn't have anything to do with a vm name, rename MAX_SNAPSHOT_VMNAME to MAX_SNAPSHOT_FILENAME. Bump the size to PATH_MAX while here. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28879
This commit is contained in:
parent
da9713917e
commit
d656ce199d
@ -43,7 +43,7 @@
|
||||
#include <ucl.h>
|
||||
|
||||
#define BHYVE_RUN_DIR "/var/run/bhyve/"
|
||||
#define MAX_SNAPSHOT_VMNAME 100
|
||||
#define MAX_SNAPSHOT_FILENAME PATH_MAX
|
||||
|
||||
struct vmctx;
|
||||
|
||||
@ -67,7 +67,7 @@ enum ipc_opcode {
|
||||
|
||||
struct checkpoint_op {
|
||||
unsigned int op;
|
||||
char snapshot_filename[MAX_SNAPSHOT_VMNAME];
|
||||
char snapshot_filename[MAX_SNAPSHOT_FILENAME];
|
||||
};
|
||||
|
||||
struct checkpoint_thread_info {
|
||||
|
@ -1739,7 +1739,7 @@ snapshot_request(struct vmctx *ctx, const char *file, enum ipc_opcode code)
|
||||
struct checkpoint_op op;
|
||||
|
||||
op.op = code;
|
||||
strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_VMNAME);
|
||||
strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_FILENAME);
|
||||
|
||||
return (send_checkpoint_op_req(ctx, &op));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user