Re: [RFC PATCH] add filesystem subtype support

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

 



> >-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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux