diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/firewire/firewire.c | 6 | ||||
-rw-r--r-- | sys/dev/syscons/daemon/daemon_saver.c | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index c2484ae..aff0418 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -39,13 +39,13 @@ #include <sys/systm.h> #include <sys/types.h> +#include <sys/jail.h> #include <sys/kernel.h> #include <sys/module.h> #include <sys/malloc.h> #include <sys/conf.h> #include <sys/sysctl.h> #include <sys/kthread.h> -#include <sys/vimage.h> #include <sys/kdb.h> @@ -723,7 +723,9 @@ fw_reset_crom(struct firewire_comm *fc) crom_add_simple_text(src, root, &buf->vendor, "FreeBSD Project"); crom_add_entry(root, CSRKEY_HW, __FreeBSD_version); #endif - crom_add_simple_text(src, root, &buf->hw, G_hostname); + mtx_lock(&prison0.pr_mtx); + crom_add_simple_text(src, root, &buf->hw, prison0.pr_host); + mtx_unlock(&prison0.pr_mtx); } /* diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c index ac91313..7530b4d 100644 --- a/sys/dev/syscons/daemon/daemon_saver.c +++ b/sys/dev/syscons/daemon/daemon_saver.c @@ -32,11 +32,11 @@ #include <sys/systm.h> #include <sys/module.h> #include <sys/malloc.h> +#include <sys/jail.h> #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/consio.h> #include <sys/fbio.h> -#include <sys/vimage.h> #include <machine/pc/display.h> @@ -352,11 +352,12 @@ static int daemon_init(video_adapter_t *adp) { - /* XXXRW: Locking -- these can change! */ - messagelen = strlen(G_hostname) + 3 + strlen(ostype) + 1 + + mtx_lock(&prison0.pr_mtx); + messagelen = strlen(prison0.pr_host) + 3 + strlen(ostype) + 1 + strlen(osrelease); message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK); - sprintf(message, "%s - %s %s", G_hostname, ostype, osrelease); + sprintf(message, "%s - %s %s", prison0.pr_host, ostype, osrelease); + mtx_unlock(&prison0.pr_mtx); blanked = 0; switch (adp->va_mode) { case M_PC98_80x25: |