LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@linux01.gwdg.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Szakacsits Szabolcs <szaka@sienet.hu>
Subject: Re: [RFC PATCH] add filesystem subtype support
Date: Mon, 12 Feb 2007 19:27:22 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.4.61.0702121923350.26360@yvahk01.tjqt.qr> (raw)
In-Reply-To: <E1HGZhm-0003eb-00@dorka.pomaz.szeredi.hu>

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/

  parent reply	other threads:[~2007-02-12 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 11:50 Miklos Szeredi
2007-02-12 12:39 ` Szakacsits Szabolcs
2007-02-12 14:03   ` Miklos Szeredi
2007-02-12 18:27 ` Jan Engelhardt [this message]
2007-02-12 22:27   ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0702121923350.26360@yvahk01.tjqt.qr \
    --to=jengelh@linux01.gwdg.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=szaka@sienet.hu \
    --subject='Re: [RFC PATCH] add filesystem subtype support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).