Re: [RFC PATCH] add filesystem subtype support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Feb 12 2007 12:50, Miklos Szeredi wrote:
>Index: linux/fs/filesystems.c
>===================================================================
>--- linux.orig/fs/filesystems.c	2007-02-12 12:42:55.000000000 +0100
>+++ linux/fs/filesystems.c	2007-02-12 12:43:00.000000000 +0100
>@@ -42,11 +42,12 @@ void put_filesystem(struct file_system_t
> 	module_put(fs->owner);
> }
> 
>-static struct file_system_type **find_filesystem(const char *name)
>+static struct file_system_type **find_filesystem(const char *name, unsigned len)
> {
> 	struct file_system_type **p;
> 	for (p=&file_systems; *p; p=&(*p)->next)
>-		if (strcmp((*p)->name,name) == 0)
>+		if (strlen((*p)->name) == len &&
>+		    strncmp((*p)->name, name, len) == 0)
> 			break;
> 	return p;
> }

Question btw, why does this function return a struct file_system_type ** at
all? Would not struct file_system_type * suffice?


I like the idea. Then the "real filesystem type" (e.g. sshfs) pops up in the
fstype field in getmntent, and `df`, for example.


Jan
-- 
ft: http://freshmeat.net/p/chaostables/
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux