Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030211AbXBLW1a (ORCPT ); Mon, 12 Feb 2007 17:27:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030213AbXBLW13 (ORCPT ); Mon, 12 Feb 2007 17:27:29 -0500 Received: from mail-gw1.sa.eol.hu ([212.108.200.67]:56936 "EHLO mail-gw1.sa.eol.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030211AbXBLW12 (ORCPT ); Mon, 12 Feb 2007 17:27:28 -0500 To: jengelh@linux01.gwdg.de CC: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, szaka@sienet.hu In-reply-to: (message from Jan Engelhardt on Mon, 12 Feb 2007 19:27:22 +0100 (MET)) Subject: Re: [RFC PATCH] add filesystem subtype support References: Message-Id: From: Miklos Szeredi Date: Mon, 12 Feb 2007 23:27:13 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 860 Lines: 23 > >-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 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/