-
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.
perf tools: Eliminate duplicate code and use PATH_MAX consistently
No need for multiple definitions for STR() and die(), also use SuSv2's PATH_MAX instead of adding MAX_PATH. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-qpujjkw7u0bf0tr4wt55cr9y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
- Loading branch information
Arnaldo Carvalho de Melo
committed
Nov 28, 2011
1 parent
c23205c
commit c168fbf
Showing
6 changed files
with
24 additions
and
62 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
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
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,25 +1,14 @@ | ||
#ifndef __DEBUGFS_H__ | ||
#define __DEBUGFS_H__ | ||
|
||
#include <sys/mount.h> | ||
|
||
#ifndef MAX_PATH | ||
# define MAX_PATH 256 | ||
#endif | ||
|
||
#ifndef STR | ||
# define _STR(x) #x | ||
# define STR(x) _STR(x) | ||
#endif | ||
|
||
extern const char *debugfs_find_mountpoint(void); | ||
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 *element, char *buffer, int size); | ||
const char *debugfs_find_mountpoint(void); | ||
int debugfs_valid_mountpoint(const char *debugfs); | ||
int debugfs_valid_entry(const char *path); | ||
char *debugfs_mount(const char *mountpoint); | ||
int debugfs_umount(void); | ||
int debugfs_write(const char *entry, const char *value); | ||
int debugfs_read(const char *entry, char *buffer, size_t size); | ||
void debugfs_force_cleanup(void); | ||
int debugfs_make_path(const char *element, char *buffer, int size); | ||
|
||
#endif /* __DEBUGFS_H__ */ |
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