summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extras/volume_id/lib/Makefile4
-rw-r--r--extras/volume_id/lib/exported_symbols43
-rw-r--r--extras/volume_id/lib/libvolume_id.h4
-rw-r--r--extras/volume_id/lib/util.h6
-rw-r--r--extras/volume_id/lib/volume_id.c2
-rw-r--r--extras/volume_id/vol_id.c6
6 files changed, 55 insertions, 10 deletions
diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile
index 6a12f0e67a..f69df5f5ca 100644
--- a/extras/volume_id/lib/Makefile
+++ b/extras/volume_id/lib/Makefile
@@ -81,7 +81,9 @@ libvolume_id.a: $(HEADERS) $(OBJS)
$(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS))
$(E) " CC " $@
- $(Q) $(CC) -shared $(CFLAGS) -o $@ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR) $(addprefix .shlib/,$(OBJS))
+ $(Q) $(CC) -shared $(CFLAGS) -o $@ \
+ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \
+ $(addprefix .shlib/,$(OBJS))
$(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR)
$(Q) ln -sf $@ libvolume_id.so
diff --git a/extras/volume_id/lib/exported_symbols b/extras/volume_id/lib/exported_symbols
new file mode 100644
index 0000000000..b1ff3cce3a
--- /dev/null
+++ b/extras/volume_id/lib/exported_symbols
@@ -0,0 +1,43 @@
+{ global:
+ volume_id_log_fn;
+ volume_id_open_fd;
+ volume_id_open_node;
+ volume_id_probe_all;
+ volume_id_probe_filesystem;
+ volume_id_probe_raid;
+ volume_id_close;
+
+ volume_id_probe_cramfs;
+ volume_id_probe_ext;
+ volume_id_probe_vfat;
+ volume_id_probe_hfs_hfsplus;
+ volume_id_probe_hpfs;
+ volume_id_probe_iso9660;
+ volume_id_probe_jfs;
+ volume_id_probe_minix;
+ volume_id_probe_ntfs;
+ volume_id_probe_ocfs1;
+ volume_id_probe_ocfs2;
+ volume_id_probe_reiserfs;
+ volume_id_probe_romfs;
+ volume_id_probe_sysv;
+ volume_id_probe_udf;
+ volume_id_probe_ufs;
+ volume_id_probe_vxfs;
+ volume_id_probe_xfs;
+ volume_id_probe_squashfs;
+
+ volume_id_probe_linux_raid;
+ volume_id_probe_lvm1;
+ volume_id_probe_lvm2;
+ volume_id_probe_intel_software_raid;
+ volume_id_probe_highpoint_37x_raid;
+ volume_id_probe_highpoint_45x_raid;
+ volume_id_probe_lsi_mega_raid;
+ volume_id_probe_nvidia_raid;
+ volume_id_probe_promise_fasttrack_raid;
+ volume_id_probe_silicon_medley_raid;
+ volume_id_probe_via_raid;
+local:
+ *;
+};
diff --git a/extras/volume_id/lib/libvolume_id.h b/extras/volume_id/lib/libvolume_id.h
index 7faf8d8af3..06b1baa9d0 100644
--- a/extras/volume_id/lib/libvolume_id.h
+++ b/extras/volume_id/lib/libvolume_id.h
@@ -19,10 +19,10 @@
#endif
-typedef void (*volume_id_log_fn)(int priority, const char *file, int line, const char *format, ...)
+typedef void (*volume_id_log_fn_t)(int priority, const char *file, int line, const char *format, ...)
__attribute__ ((format(printf, 4, 5)));
-extern volume_id_log_fn volume_id_log;
+extern volume_id_log_fn_t volume_id_log_fn;
#define VOLUME_ID_LABEL_SIZE 64
#define VOLUME_ID_UUID_SIZE 36
diff --git a/extras/volume_id/lib/util.h b/extras/volume_id/lib/util.h
index 1d1b53bb57..dc60a09123 100644
--- a/extras/volume_id/lib/util.h
+++ b/extras/volume_id/lib/util.h
@@ -23,10 +23,10 @@
#include <byteswap.h>
#include <syslog.h>
-#define err(format, arg...) volume_id_log(LOG_ERR, __FILE__, __LINE__, format, ##arg)
-#define info(format, arg...) volume_id_log(LOG_INFO, __FILE__, __LINE__, format, ##arg)
+#define err(format, arg...) volume_id_log_fn(LOG_ERR, __FILE__, __LINE__, format, ##arg)
+#define info(format, arg...) volume_id_log_fn(LOG_INFO, __FILE__, __LINE__, format, ##arg)
#ifdef DEBUG
-#define dbg(format, arg...) volume_id_log(LOG_DEBUG, __FILE__, __LINE__, format, ##arg)
+#define dbg(format, arg...) volume_id_log_fn(LOG_DEBUG, __FILE__, __LINE__, format, ##arg)
#else
#define dbg(format, arg...) do { } while (0)
#endif
diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c
index 4662b210dc..9f8e39b518 100644
--- a/extras/volume_id/lib/volume_id.c
+++ b/extras/volume_id/lib/volume_id.c
@@ -35,7 +35,7 @@ static void default_log(int priority, const char *file, int line, const char *fo
return;
}
-volume_id_log_fn volume_id_log = default_log;
+volume_id_log_fn_t volume_id_log_fn = default_log;
int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size)
{
diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c
index 3a7361a6ac..2274550c19 100644
--- a/extras/volume_id/vol_id.c
+++ b/extras/volume_id/vol_id.c
@@ -1,7 +1,7 @@
/*
- * vol_id - udev callout to read filesystem label and uuid
+ * vol_id - read filesystem label and uuid
*
- * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2005-2006 Kay Sievers <kay.sievers@vrfy.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
logging_init("vol_id");
/* hook in our debug into libvolume_id */
- volume_id_log = vid_log;
+ volume_id_log_fn = vid_log;
for (i = 1 ; i < argc; i++) {
char *arg = argv[i];