[PATCH] boot0cnf - broken?
Marcin Koziej
creep at daedalus.desk.pl
Sun Oct 10 10:38:31 PDT 2004
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.
More information about the freebsd-questions
mailing list