From nobody Thu Jan 26 18:54:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P2qcr1DWlz3bPHs; Thu, 26 Jan 2023 18:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P2qcr0HpCz45YP; Thu, 26 Jan 2023 18:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674759260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGNEXm7sjqz+PS7OZK9YpxRxmmZH/qPut5A3KM4C2+Y=; b=F8AxRiwCoCAKJ23+ak1PJuyFzKG/jZfIBQ3dTMSS4jnxWfaRJ1e0ZdrvFVidkUpZUkFEzL s2khAnF/9mH3zJCxkvoTIS7c63hK1KyCYnR/YBqPhUWji/Kyhy5k19nGPnmglsTqJk3ReR NSn9PAiNHZuuFZYUFA5aYQsQRl/OcSd3WSSy/GlrnOreV3dDVauJiei0LuvjQTAemaKqGU 09Zqj83WXnkHaMAPwn8u1lsWTaJF3JYP72Jxl+rLBn6+wiJVfPlzEScmcYSMnM747Pm0Ci tZ1cYtowWgPahBtMVmMOuVs41mbwfQcKNb+pnd4FKfWTKgN/5jZmm2IHDpd7zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674759260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGNEXm7sjqz+PS7OZK9YpxRxmmZH/qPut5A3KM4C2+Y=; b=X0PJaF9ULRcpfydGP7aD4shEvAkVPDNhCP/j9n8vq6dgX4IzMjOjvRqvhW9Rt5omKeDIqW CuGulkgvG2ZWyUACNYQGKqNR25EiF8fmgi9dSQJYc5A6+b3ccxU6rzA4HDyukK0kOL/Iyt TLcM4mCCkerAF+V9bW/hYVoMfCAk/GKcopIHGa1Pq2Tjb8l5TLaW3I7oySeDgBCydTcSNZ YJBMm5wsvVw4dJZXdS8Y+QQVR18pdxXO/k29dsa49kpz65zcx3gQPo+HthvrAuaSRxk6wd KO6y9NYRZ5tClbqJiGgylRE08trWlrZf714t+8LcHKVUT7bwYPB2Lb7fVblsQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674759260; a=rsa-sha256; cv=none; b=br0IUp+QPB/k08uwCrRsPQcVjHqw7rSqCRLOJUHNuc6EKASQpwxbztuL0R0dMmC++uc1ys o9quIt2hLYcZJOOok/zJBZ2U/JHBi3Wxntx9N4hRVGhPk0dMfV7uRjOYqU3Dfx7XXZtcNA kcCu9Xlde29BMuyw5tMRj4qYK5Mx9yhAT1Z/33SYkomRD/7TTIeqhxbNMVFykwxlA0Pb7D /ToVAQJOyjwMsEDG6geXlvN9KySnMhe5Q44W0bk5h+bufkjnx8T4YV/6lCwdLWwKfRaJ9D wVDsZg6Djacf5kGAHfIXqvSic5S0icKJzMfmcVk5Wla448k1f2O8CizP1ZIIhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P2qcq6RDdzgJw; Thu, 26 Jan 2023 18:54:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30QIsJCc034056; Thu, 26 Jan 2023 18:54:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QIsJo1034055; Thu, 26 Jan 2023 18:54:19 GMT (envelope-from git) Date: Thu, 26 Jan 2023 18:54:19 GMT Message-Id: <202301261854.30QIsJo1034055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bcf297e86e16 - stable/13 - bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bcf297e86e16232b2ebb9a7a09d776c09bc3435d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bcf297e86e16232b2ebb9a7a09d776c09bc3435d commit bcf297e86e16232b2ebb9a7a09d776c09bc3435d Author: Robert Wing AuthorDate: 2021-02-27 21:07:35 +0000 Commit: John Baldwin CommitDate: 2023-01-26 18:45:54 +0000 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 (cherry picked from commit d656ce199d72f1aeeef1b2e28b4a284c968a8d03) --- usr.sbin/bhyve/snapshot.h | 4 ++-- usr.sbin/bhyvectl/bhyvectl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h index 62b2083b9830..8a6ee67ef19d 100644 --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -43,7 +43,7 @@ #include #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 { diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 5683a84c0242..0f7b9533fe4b 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -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)); }