Author: simon Date: 2010-09-04 12:50:06 +0200 (Sat, 04 Sep 2010) New Revision: 1781
Modified: trunk/batctl/debugfs.c trunk/batctl/debugfs.h Log: batctl: remove dead code
We don't need the debugfs_force_cleanup() and debugfs_umount() function in batctl and therefore remove it. We keep it debugfs_read() even if unreferenced for later usage.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
Modified: trunk/batctl/debugfs.c =================================================================== --- trunk/batctl/debugfs.c 2010-08-29 00:02:14 UTC (rev 1780) +++ trunk/batctl/debugfs.c 2010-09-04 10:50:06 UTC (rev 1781) @@ -41,14 +41,6 @@ NULL, };
-/* use this to force a umount */ -void debugfs_force_cleanup(void) -{ - debugfs_find_mountpoint(); - debugfs_premounted = 0; - debugfs_umount(); -} - /* construct a full path to a debugfs element */ int debugfs_make_path(const char *fmt, char *mesh_iface, char *buffer, int size) { @@ -163,27 +155,6 @@ return debugfs_mountpoint; }
-/* umount the debugfs */ - -int debugfs_umount(void) -{ - char umountcmd[128]; - int ret; - - /* if it was already mounted, leave it */ - if (debugfs_premounted) - return 0; - - /* make sure it's a valid mount point */ - ret = debugfs_valid_mountpoint(debugfs_mountpoint); - if (ret) - return ret; - - snprintf(umountcmd, sizeof(umountcmd), - "/bin/umount %s", debugfs_mountpoint); - return system(umountcmd); -} - int debugfs_write(const char *entry, const char *value) { char path[MAX_PATH+1];
Modified: trunk/batctl/debugfs.h =================================================================== --- trunk/batctl/debugfs.h 2010-08-29 00:02:14 UTC (rev 1780) +++ trunk/batctl/debugfs.h 2010-09-04 10:50:06 UTC (rev 1781) @@ -37,10 +37,8 @@ extern int debugfs_valid_mountpoint(const char *debugfs); extern int debugfs_valid_entry(const char *path); extern char *debugfs_mount(const char *mountpoint); -extern int debugfs_umount(void); extern int debugfs_write(const char *entry, const char *value); extern int debugfs_read(const char *entry, char *buffer, size_t size); -extern void debugfs_force_cleanup(void); extern int debugfs_make_path(const char *fmt, char *mesh_iface, char *buffer, int size);