From nobody Tue Aug 23 20:46:56 2022 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 4MC1Vm4MsFz4ZFh6; Tue, 23 Aug 2022 20:46:56 +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 4MC1Vm2YKTz3ZBG; Tue, 23 Aug 2022 20:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661287616; 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=hD/7XR6f0qWnoPPT2BPzzetLFOxkpZChNUcVOaNSIpE=; b=TMGuxCCDBK7lF8fdjtE72NJIGxdKuLbw8fG/Bb3kp03ldzNAAEBNNIAgDgTR/Qbpv4WVY9 N+mgOsYm6y1FaXiwm/fJVf6PcT7zy3IMvvIPhlTM3OQCh8f2T2S2qr23nl4Xao5zF7dSP2 1UNpOwRxBkF+UYHUVIOFIxXlWlV54wZTh9FEg78J85LhN0hNQaiEwSWe4AnB5fmxRGAtul flGUKjSQZAecnpsCdC7QszRxrWGLpEalNxH5Gnd5dzxvLeoA1QAW72xRkBQWfnWomjdfba RuuA/n9lpUcqKepkhqUFdlHrBboGEh3z4ZMdG3nW2iHA+NNU9BmnZd0R5RZOYg== 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 4MC1Vm1Mpjzk9p; Tue, 23 Aug 2022 20:46:56 +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 27NKkuSl049320; Tue, 23 Aug 2022 20:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27NKkuvh049319; Tue, 23 Aug 2022 20:46:56 GMT (envelope-from git) Date: Tue, 23 Aug 2022 20:46:56 GMT Message-Id: <202208232046.27NKkuvh049319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1579c6e2dc9b - stable/13 - bhyve: Sprinkle const qualifiers where appropriate 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1579c6e2dc9bc9d6eefa519ec105f20b729a0f14 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661287616; 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=hD/7XR6f0qWnoPPT2BPzzetLFOxkpZChNUcVOaNSIpE=; b=vOt9sdlyfmRPOiqUUZ/QKF6nBaRjJdkVj4yjccZ6LZSCQppmDFrV3aKMihuDTNVexl8wmS F6gPD+GMBqiVEh4BG17CE16co5l6OKAVc8nVNthd3/FDtWAKu7+Z5teee0PG4GcCiivH7h zNnGRKPz5FZ2dxG6R044Sy+ELRzKxXrqV8us69K172l6+utKXN1AOZpMY7zqcSYMAbNcKA +Q+guJcigM+yxFMOkpDOCz/rw1wbYE0ELBTpXtNr1MMYyRxsnsDRuc+muGvroMwK/nI0l1 HFnU5D1xJqB09JJBC+QxnsyTw4q5W3g+5vYwKSo+yrWVCervnoHd18M+GmbQLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661287616; a=rsa-sha256; cv=none; b=be/b6IbndSMwAqjz/3MN+N+BoYYwsxFwiLdEk4POoiBIi4Y21uWM8lVj2NZdHbix65M5Cr dH7QeNIY3bp67it8ZlDzAVc80RaN00gvBHuT91b26dT4A6ihXvA7cDUiMpZcB7n2DwLKrE gUF4kRVp7U/d9EsXGbOvsFiizRaKBL1h7TQQul7sC8eCvZgSandN80Rh3ukFvv6n/gav1Z 9+IvCpUfVh6ED3vBJnaoMg9w/P6CVePePGJ5Nb18VivOqdfDfFE90Mo3nBTGy7m7tkl1aA tUNQpW7txXrhyXGpiCn741+Dl48S8qEmZTkUX9pRlOZG4il5F+JXsyBuIZKRWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1579c6e2dc9bc9d6eefa519ec105f20b729a0f14 commit 1579c6e2dc9bc9d6eefa519ec105f20b729a0f14 Author: Mark Johnston AuthorDate: 2022-08-16 17:13:12 +0000 Commit: Mark Johnston CommitDate: 2022-08-23 20:06:19 +0000 bhyve: Sprinkle const qualifiers where appropriate No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit d06bf11c06a0c2a6f52ba23f9b5204912cfd6fc5) --- usr.sbin/bhyve/acpi.c | 2 +- usr.sbin/bhyve/pci_emul.h | 2 +- usr.sbin/bhyve/pci_hda.c | 4 ++-- usr.sbin/bhyve/pci_hda.h | 2 +- usr.sbin/bhyve/rfb.c | 6 +++--- usr.sbin/bhyve/rfb.h | 3 ++- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c index 360191ac6c4d..c9583e3fa218 100644 --- a/usr.sbin/bhyve/acpi.c +++ b/usr.sbin/bhyve/acpi.c @@ -858,7 +858,7 @@ basl_compile(struct vmctx *ctx, int (*fwrite_section)(FILE *), uint64_t offset) { struct basl_fio io[2]; static char iaslbuf[3*MAXPATHLEN + 10]; - char *fmt; + const char *fmt; int err; err = basl_start(&io[0], &io[1]); diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index fff70530c66c..28f4fc422bee 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -51,7 +51,7 @@ struct memory_region; struct vm_snapshot_meta; struct pci_devemu { - char *pe_emu; /* Name of device emulation */ + const char *pe_emu; /* Name of device emulation */ /* instance creation */ int (*pe_init)(struct vmctx *, struct pci_devinst *, diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index e7c54f01159f..1a2a3844ab20 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -94,7 +94,7 @@ struct hda_bdle_desc { }; struct hda_codec_cmd_ctl { - char *name; + const char *name; void *dma_vaddr; uint8_t run; uint16_t rp; @@ -729,7 +729,7 @@ static inline void hda_print_cmd_ctl_data(struct hda_codec_cmd_ctl *p) { #if DEBUG_HDA == 1 - char *name = p->name; + const char *name = p->name; #endif DPRINTF("%s size: %d", name, p->size); DPRINTF("%s dma_vaddr: %p", name, p->dma_vaddr); diff --git a/usr.sbin/bhyve/pci_hda.h b/usr.sbin/bhyve/pci_hda.h index 65a85f6d603d..da473800bd80 100644 --- a/usr.sbin/bhyve/pci_hda.h +++ b/usr.sbin/bhyve/pci_hda.h @@ -70,7 +70,7 @@ struct hda_codec_inst { }; struct hda_codec_class { - char *name; + const char *name; int (*init)(struct hda_codec_inst *hci, const char *play, const char *rec); int (*reset)(struct hda_codec_inst *hci); diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c index dc728aa46b64..4a550bca975b 100644 --- a/usr.sbin/bhyve/rfb.c +++ b/usr.sbin/bhyve/rfb.c @@ -113,7 +113,7 @@ struct rfb_softc { int width, height; - char *password; + const char *password; bool enc_raw_ok; bool enc_zlib_ok; @@ -795,7 +795,7 @@ rfb_handle(struct rfb_softc *rc, int cfd) { const char *vbuf = "RFB 003.008\n"; unsigned char buf[80]; - unsigned char *message = NULL; + unsigned const char *message; #ifndef NO_OPENSSL unsigned char challenge[AUTH_LENGTH]; @@ -1060,7 +1060,7 @@ sse42_supported(void) } int -rfb_init(char *hostname, int port, int wait, char *password) +rfb_init(const char *hostname, int port, int wait, const char *password) { int e; char servname[6]; diff --git a/usr.sbin/bhyve/rfb.h b/usr.sbin/bhyve/rfb.h index dae43b2ec395..5a5785af41b0 100644 --- a/usr.sbin/bhyve/rfb.h +++ b/usr.sbin/bhyve/rfb.h @@ -33,6 +33,7 @@ #define RFB_PORT 5900 -int rfb_init(char *hostname, int port, int wait, char *password); +int rfb_init(const char *hostname, int port, int wait, + const char *password); #endif /* _RFB_H_ */