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
@ -187,6 +187,14 @@ vfspath(const char *name)
|
|||||||
int
|
int
|
||||||
vfsisloadable(const char *name)
|
vfsisloadable(const char *name)
|
||||||
{
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
fd = open("/dev/lkm", O_RDWR, 0);
|
||||||
|
if(fd < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
close(fd);
|
||||||
|
|
||||||
return !!vfspath(name);
|
return !!vfspath(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user