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:
parent
67866c4075
commit
07ef895025
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3061
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user