Date: Sun, 10 Oct 2004 19:31:17 +0200 From: Marcin Koziej <creep@daedalus.desk.pl> To: freebsd-questions@freebsd.org Subject: [PATCH] boot0cnf - broken? Message-ID: <20041010173117.GA5850@daedalus.desk.pl> In-Reply-To: <20041007155819.5928916A4D0@hub.freebsd.org> References: <20041007155819.5928916A4D0@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
FreeBSD 5.2.1-RELEASE-p9 #1: Thu Aug 12 19:39:05 CEST 2004 When wanted to make a simple boot fd using boot0cfg, i got error: boot0cfg: write_mbr: /dev/fd0: No such file or directory truss revealed that open("/dev/fd0",O_WRONLY,0666) failed with ERR#16 'Device busy'. No wonder, fd0 was opened for reading just moment before in read_mbr and wasn't closed. A small change fixed boot0cfg: ================================================== --- boot0cfg.c Sun Oct 10 19:27:22 2004 +++ boot0cfg.c.ok Sun Oct 10 19:26:54 2004 @@ -244,6 +244,7 @@ *mbr = malloc(sizeof(buf)); memcpy(*mbr, buf, sizeof(buf)); + close(fd); return sizeof(buf); } ================================================== Can anybody check if this is an issue for FreeBSD 5.3 beta and if yes send a pr? m.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041010173117.GA5850>