aboutsummaryrefslogtreecommitdiff
path: root/kernel-features.c
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 17:01:47 +0100
committerEric B Munson <ebmunson@us.ibm.com>2008-10-21 11:14:23 +0100
commit82ce959dfa0edbe4a33d8a632508552106b7d7ec (patch)
treede0214301cefb2f92f4bce02a89c2308d57fcef9 /kernel-features.c
parentb92d7be2fadf311664fc50bf9c563d42afa6fc23 (diff)
downloadlibhugetlbfs-82ce959dfa0edbe4a33d8a632508552106b7d7ec.tar.gz
move to a new library local idiom
Currently we have three types of function: file local -- marked static in the normal way, library local -- external but prefixed with __lh_ library exported -- external and listed in the library.lds file While the library prefix works, it does not allow functions to trivially move from file local to library local as all references to the function have to be modified to the new name. This patch introduces a new idiom. When a function is intended to be library local it is already necessary to declare that function in the libhugetlbfs_internal.h, if we also add a single define for that function adding the __lh_ prefix (as below) then all other references including the original definition may use the original name unchanged but the function will remain unexported: #define hpool_sizes __lh_hpool_sizes extern int hpool_sizes(struct hpage_pool *, int); This patch converts all current library local functions to this new idiom. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Adam Litke <agl@us.ibm.com> Acked-by: Mel Gorman <mel@csn.ul.ie>
Diffstat (limited to 'kernel-features.c')
-rw-r--r--kernel-features.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel-features.c b/kernel-features.c
index 577e560..8f105b4 100644
--- a/kernel-features.c
+++ b/kernel-features.c
@@ -199,7 +199,7 @@ int check_features_env_valid(const char *env)
return 0;
}
-void __lh_setup_features()
+void setup_features()
{
struct utsname u;
char *env;