From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Thu, 4 Oct 2012 01:06:55 +0800 References: <1349282136-23059-1-git-send-email-ordex@autistici.org> In-Reply-To: <1349282136-23059-1-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201210040106.55685.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: export compatibility version via debugfs Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Thursday, October 04, 2012 00:35:36 Antonio Quartulli wrote: > @@ -355,6 +366,13 @@ void batadv_debugfs_init(void) > if (!file) > pr_err("Can't add debugfs file: %s\n", > bat_debug->attr.name); > + bat_debug = &batadv_debuginfo_compat_version; > + file = debugfs_create_file(bat_debug->attr.name, > + S_IFREG | bat_debug->attr.mode, > + batadv_debugfs, NULL, &bat_debug->fops); > + if (!file) > + pr_err("Can't add debugfs file: %s\n", > bat_debug->attr.name); + > out: > return; > } If we start to create more files here you should add a a loop like in batadv_debugfs_add_meshif() to avoid duplicate code. Cheers, Marek