Your message dated Mon, 5 Feb 2018 13:22:52 +0100
with message-id <949032db-80c3-05e1-dca0-8e4dca75d...@debian.org>
and subject line Re: Bug#827718: [bugzi...@busybox.net: [Bug 9031] [PATCH] 
init: open /dev/console on FreeBSD]
has caused the Debian Bug report #827718,
regarding init: open /dev/console on GNU/kFreeBSD
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
827718: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827718
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: busybox
Version: 1.22.0-19
Tags: patch

FreeBSD kernel doesn't tell PID 1 the pathname of /dev/console through CONSOLE 
environment variable like Linux does. Instead it expects PID 1 to always open 
/dev/console.

This patch is tested on ubuntuBSD but I think it should work on Debian too (I 
haven't tested the whole init yet, but I verified that with my patch it can 
print to stdout).

I've also sent it to BusyBox bugzilla: 
https://bugs.busybox.net/show_bug.cgi?id=9031

-- 
Jon Boden

ubuntuBSD -- The power of FreeBSD kernel with familiarity of Ubuntu OS!

http://www.ubuntubsd.org/ -- https://twitter.com/ubuntuBSD
Index: busybox-1.22.0/init/init.c
===================================================================
--- busybox-1.22.0.orig/init/init.c
+++ busybox-1.22.0/init/init.c
@@ -277,11 +277,19 @@ static void console_init(void)
 #ifdef VT_OPENQRY
 	int vtno;
 #endif
-	char *s;
 
+#if defined(__linux__)
+	char *s;
 	s = getenv("CONSOLE");
 	if (!s)
 		s = getenv("console");
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+	const char *s;
+	s = "/dev/console";
+#else
+#error "we don't know how to open the console on this system"
+#endif
+
 	if (s) {
 		int fd = open(s, O_RDWR | O_NONBLOCK | O_NOCTTY);
 		if (fd >= 0) {

--- End Message ---
--- Begin Message ---
Version: 1:1.27.2-1

On 23/08/16 18:43, Jon Boden wrote:
> --- Comment #2 from Denys Vlasenko <vda.li...@googlemail.com> ---
> Fixed in git.

Hi Joe,

That commit (d035528261eb9304e9e448c7d8847095b8e8c7c5) was included in
the Busybox 1.26.0 upstream release, and therefore included in the
Debian upload for 1:1.27.2-1 back in September.

I realise that busybox doesn't currently build for kfreebsd-*, but
that's a separate issue (and any help is gratefully received).

Regards,
Chris

-- 
Chris Boot
bo...@debian.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to