From nobody Tue Aug 16 18:22:10 2022 X-Original-To: dev-commits-src-all@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 4M6fcz1CNmz4Z5TF; Tue, 16 Aug 2022 18:22:11 +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 4M6fcy6p3qz46rc; Tue, 16 Aug 2022 18:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660674130; 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=dCjrtaHJ163hXAL32HbTLoTyYEqj29JKpa+x8sO2zSA=; b=liqUZBFa0T0qm26Ddmrw6DPWJaLqJvbXdIqG2Yh2Ci6BVlUNQIG3Z6EWKJ4e1lUd9ZzB7m 6YSqIm6udS/mfyCvtikZv7L+JXoiDoInj+UTNQx55lunkAZiyRlwFUyGB+NBjxxngQ/ViT zPdtkqAaK9Rt71shZ9oUCW2hAxtMJtJ/pKlh+ekak48yi2hMbR1nwCvYS5iDsmnlg81t2j 8iBzHPH4j56/HUQcOl0m86NhW4fZfAAtSpt+62Ee1ITzuLCWuDP76BEGQhYVk4rDQPMO1O SuzZ5YJS76HmWwrZSvaENtcwLXCsOVvq7dA+N6fBiDGk5NFmPl+Z5mt8FZV97g== 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 4M6fcy5vgczJnb; Tue, 16 Aug 2022 18:22:10 +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 27GIMA6Q028759; Tue, 16 Aug 2022 18:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27GIMAI1028758; Tue, 16 Aug 2022 18:22:10 GMT (envelope-from git) Date: Tue, 16 Aug 2022 18:22:10 GMT Message-Id: <202208161822.27GIMAI1028758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d06bf11c06a0 - main - bhyve: Sprinkle const qualifiers where appropriate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d06bf11c06a0c2a6f52ba23f9b5204912cfd6fc5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660674130; 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=dCjrtaHJ163hXAL32HbTLoTyYEqj29JKpa+x8sO2zSA=; b=P0denQFI60SuAC3bY1ujZyyv9z1DXhRavaZRE3605BgDNMnRpirYLm1HYTFdNCNUdztbf3 26Qx2/AdGcIeDCP+prw5x/Jx918vPeBMEOx51oeNrAl2G3FA2smBKTJmXg+BOGCtUnpJFv qIYz2OiCVxqFuvx4Bem//tGa8L11kybaYub1HOJv+jVz8dbrO7bPe3Nm5kdmKErMXBXMfS 5QNFUQcoNTZDBshIh5HTcBIHlNmvp3Woe00Pgei+hjBgSkRrqfB/yqnx73C+l/VskIoiwL 42mVW+fUYU+/OyEmdJyCdkaJhUKiT/fnTisYttEQ3PMoTEpoUSmWzQBPN0e03Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660674131; a=rsa-sha256; cv=none; b=ZmkwiAQNvnyw6oxFriGu9lfHFpdmCNlYBuJQ5Tj76CzNxmJeYKip6d4eKGyEqsSW3liQiB IAoafaSZ6hb9+wa9dS+FC5cnmCsXNkx9mBnkcHSb3FDDZy93NBtMGSUeyFbWyCDxVwX84+ xplANdR46LoJADZhHoe0aIIUsSmcatAKg8ZxLL2ROE1nXXR8sWpgA1IOVHMff32RL75vUm FVk1a6vC9x5dS5SFEQt9+dPBmjlzMwpbCriD7q8rjFTjgUQo5WfiRaV+HWgDJYOhJJsHGB Sbr5/kGixrrnJzhWcOZOCu/9G20O42AljxW7gqW0IL0zPt2Y/QdSAJhIy5CESg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d06bf11c06a0c2a6f52ba23f9b5204912cfd6fc5 commit d06bf11c06a0c2a6f52ba23f9b5204912cfd6fc5 Author: Mark Johnston AuthorDate: 2022-08-16 17:13:12 +0000 Commit: Mark Johnston CommitDate: 2022-08-16 18:21:44 +0000 bhyve: Sprinkle const qualifiers where appropriate No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- 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 35dbf4704aab..695354b2ac0e 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 14a8fe936341..3d7b420e2bdf 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 a34366dedc5a..e86867192193 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 b55a64318e3a..88094a4f461f 100644 --- a/usr.sbin/bhyve/rfb.c +++ b/usr.sbin/bhyve/rfb.c @@ -114,7 +114,7 @@ struct rfb_softc { int width, height; - char *password; + const char *password; bool enc_raw_ok; bool enc_zlib_ok; @@ -859,7 +859,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]; @@ -1130,7 +1130,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_ */