diff options
author | marcel <marcel@FreeBSD.org> | 2003-03-03 00:58:47 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-03-03 00:58:47 +0000 |
commit | 4007bcfd7b22842aa8a9859449e32be7ca59db85 (patch) | |
tree | e74208fe7f9dbd3140ebd17dcd81ed0996fb53e1 /lib/libstand/tftp.c | |
parent | ae4db1f08233575f4a5a6e4e844ab77f5990c5dd (diff) | |
download | FreeBSD-src-4007bcfd7b22842aa8a9859449e32be7ca59db85.zip FreeBSD-src-4007bcfd7b22842aa8a9859449e32be7ca59db85.tar.gz |
Fix a machine check abort caused by the EFI loader trying to open a
file in the NFS file system when the underlying device is not a
network device. A Sparc64 specific hack for this exact problem was
already present (nfs.c:1.9, tftp.c:1.10), but the problem is not
specific to Sparc64. The hack has been promoted to a non-i386 test
because on non-i386 architectures it's either impossible to have
non-network devices coexist in the same loader with the NFS FS, or
network and non-network device coexist and NFS filesystems can only
be used on top of network devices. I believe i386 pxeboot is where
this does not hold.
The root cause of this problem is in open.c where each file system
is tried until no more file systems exist or a file system returns
success. There's no notion of a list of valid file systems given
the underlying device and the non-existence of a file can cause
the invalid combination to be tried.
Diffstat (limited to 'lib/libstand/tftp.c')
-rw-r--r-- | lib/libstand/tftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 357cf00..3a6630c 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -254,10 +254,11 @@ tftp_open(path, f) struct iodesc *io; int res; -#ifdef __sparc64__ +#ifndef __i386__ if (strcmp(f->f_dev->dv_name, "net") != 0) return (EINVAL); #endif + tftpfile = (struct tftp_handle *) malloc(sizeof(*tftpfile)); if (!tftpfile) return (ENOMEM); |