Add a hack (kludge?) to avoid trying to access files backed by disk

devices as though they were backed by network devices.
This commit is contained in:
jake 2002-07-07 23:01:36 +00:00
parent 9ed546fad0
commit 9c4815fb21
2 changed files with 8 additions and 0 deletions

View File

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

View File

@ -254,6 +254,10 @@ tftp_open(path, f)
struct iodesc *io;
int res;
#ifdef __sparc64__
if (strcmp(f->f_dev->dv_name, "net") != 0)
return (EINVAL);
#endif
tftpfile = (struct tftp_handle *) malloc(sizeof(*tftpfile));
if (!tftpfile)
return (ENOMEM);