-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 205668 b: refs/heads/master c: c412143 h: refs/heads/master v: v3
- Loading branch information
Sven Eckelmann
authored and
Greg Kroah-Hartman
committed
Jun 22, 2010
1 parent
6a96d4f
commit b35d49c
Showing
10 changed files
with
464 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 1bd2c2159a32313ae1f872b6225601aed397524c | ||
refs/heads/master: c41214328a7635dc35aa81d89ea579c8a2eb2769 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright (C) 2010 B.A.T.M.A.N. contributors: | ||
* | ||
* Marek Lindner | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of version 2 of the GNU General Public | ||
* License as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
* 02110-1301, USA | ||
* | ||
*/ | ||
|
||
#include <linux/debugfs.h> | ||
|
||
#include "main.h" | ||
#include "bat_debugfs.h" | ||
#include "translation-table.h" | ||
#include "originator.h" | ||
#include "hard-interface.h" | ||
#include "vis.h" | ||
#include "icmp_socket.h" | ||
|
||
static struct dentry *bat_debugfs; | ||
|
||
void debugfs_init(void) | ||
{ | ||
bat_debugfs = debugfs_create_dir(DEBUGFS_BAT_SUBDIR, NULL); | ||
} | ||
|
||
void debugfs_destroy(void) | ||
{ | ||
if (bat_debugfs) { | ||
debugfs_remove_recursive(bat_debugfs); | ||
bat_debugfs = NULL; | ||
} | ||
} | ||
|
||
int debugfs_add_meshif(struct net_device *dev) | ||
{ | ||
struct bat_priv *bat_priv = netdev_priv(dev); | ||
|
||
if (!bat_debugfs) | ||
goto out; | ||
|
||
bat_priv->debug_dir = debugfs_create_dir(dev->name, bat_debugfs); | ||
if (!bat_priv->debug_dir) | ||
goto out; | ||
|
||
bat_socket_setup(bat_priv); | ||
|
||
return 0; | ||
out: | ||
#ifdef CONFIG_DEBUG_FS | ||
return -ENOMEM; | ||
#else | ||
return 0; | ||
#endif /* CONFIG_DEBUG_FS */ | ||
} | ||
|
||
void debugfs_del_meshif(struct net_device *dev) | ||
{ | ||
struct bat_priv *bat_priv = netdev_priv(dev); | ||
|
||
if (bat_debugfs) { | ||
debugfs_remove_recursive(bat_priv->debug_dir); | ||
bat_priv->debug_dir = NULL; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (C) 2010 B.A.T.M.A.N. contributors: | ||
* | ||
* Marek Lindner | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of version 2 of the GNU General Public | ||
* License as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
* 02110-1301, USA | ||
* | ||
*/ | ||
|
||
|
||
#ifndef BAT_DEBUGFS_H | ||
#define BAT_DEBUGFS_H | ||
|
||
#define DEBUGFS_BAT_SUBDIR "batman_adv" | ||
|
||
void debugfs_init(void); | ||
void debugfs_destroy(void); | ||
int debugfs_add_meshif(struct net_device *dev); | ||
void debugfs_del_meshif(struct net_device *dev); | ||
|
||
#endif |
Oops, something went wrong.