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

> >-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?

It's used in register_filesystem() to get the end of the list pointer.

Miklos

      reply	other threads:[~2007-02-12 22:27 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
2007-02-12 22:27   ` Miklos Szeredi [this message]

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=E1HGjdh-0004h3-00@dorka.pomaz.szeredi.hu \
    --to=miklos@szeredi.hu \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).