Fix so that people who don't have LKMs compiled in their kernels don't

get hosed: vfsisloadable() always returns false if /dev/lkm cannot be
opened for writing.
This commit is contained in:
Garrett Wollman 1994-09-25 00:48:27 +00:00
parent 67866c4075
commit 07ef895025

View File

@ -187,6 +187,14 @@ vfspath(const char *name)
int
vfsisloadable(const char *name)
{
int fd;
fd = open("/dev/lkm", O_RDWR, 0);
if(fd < 0) {
return 0;
}
close(fd);
return !!vfspath(name);
}