[Ocfs2-devel] Re: [Ocfs2-commits] bryce commits r1573 - in trunk: . mount.ocfs

Christoph Hellwig hch at lst.de
Thu Oct 14 13:50:29 CDT 2004


> +int module_loaded(char * module) {
> +	int fd;
> +	int i;
> +	char line[100];
> +
> +	if ((fd = open("/proc/modules", O_RDONLY)) >= 0 ) {
> +                        while ((i = read(fd, line, 100)) > 0) {
> +                                if (strstr(line, module) != 0) {
> +					close(fd);
> +					return (1);
> +				}
> +                        close(fd);
> +                        return (0);
> +                }
> +	}
> +}

this check is bogus, the kernel will autload a filesystem on the first
mount attempt.


More information about the Ocfs2-devel mailing list