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.
This commit is contained in:
marcel 2003-03-03 00:58:47 +00:00
parent ae4db1f082
commit 4007bcfd7b
2 changed files with 4 additions and 2 deletions

View File

@ -412,10 +412,11 @@ nfs_open(upath, f)
return (ENXIO);
}
#ifdef __sparc64__
#ifndef __i386__
if (strcmp(f->f_dev->dv_name, "net") != 0)
return(EINVAL);
#endif
if (!(desc = socktodesc(*(int *)(f->f_devdata))))
return(EINVAL);

View File

@ -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);