lkml.org 
[lkml]   [2006]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to mount own file system in linux
Hi,

On 7/19/06, Chinmaya Mishra <chinmaya4@gmail.com> wrote:
> Can you suggest me where I can get some good documents to proceed or any
> dummy code if any.

See fs/ramfs/ for an example. There's also Documentation/filesystems/vfs.txt.

On 7/19/06, Chinmaya Mishra <chinmaya4@gmail.com> wrote:
> I have tried this with the following code but it gives some warning
> messages during compilation. The file system is registered but during
> the mount command segmentation fault occurs.

So maybe pay attention to the warnings?

> static struct super_block *rfs_read_super( struct super_block *sb, void
> *buf, int size);
> static struct file_system_type rfs = {"rfs", 0, rfs_read_super, NULL};

There's no read_super in struct file_system_type. See
include/linux/fs.h for details.

> int init_module(void) {

[snip]

> void cleanup_module(void) {

[snip]

This is the old way. You really want to be using module_init and
module_exit macros.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-19 10:59    [W:1.345 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site