Use zfs_read() instead of xfsread() to read /boot.config. xfsread() fails

short read requests, so the result was that a /boot.config smaller than 512
bytes was ignored.  boot2 uses fsread() instead of xfsread() to read
/boot.config already, so this makes zfsboot more like boot2.

Submitted by:	Johny Mattsson  johny-freebsd of earthmagic org
Reviewed by:	dfr
MFC after:	3 days
This commit is contained in:
John Baldwin 2009-10-14 14:13:42 +00:00
parent 14c129fc3e
commit a944fb4cc3

View File

@ -609,7 +609,7 @@ main(void)
if (zfs_lookup(spa, PATH_CONFIG, &dn) == 0) {
off = 0;
xfsread(&dn, &off, cmd, sizeof(cmd));
zfs_read(spa, &dn, &off, cmd, sizeof(cmd));
}
if (*cmd) {