bhyve: Sprinkle const qualifiers where appropriate

No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2022-08-16 13:13:12 -04:00
parent 37045dfa89
commit d06bf11c06
6 changed files with 10 additions and 9 deletions

View File

@ -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]);

View File

@ -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 *,

View File

@ -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);

View File

@ -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);

View File

@ -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];

View File

@ -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_ */