From: Kay Sievers Date: Tue, 28 Mar 2006 00:52:58 +0000 (+0200) Subject: volume_id: define exported symbols X-Git-Tag: 174~2311 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=92da64c700371126ee3bde79f983e0b3056d9442 volume_id: define exported symbols --- diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile index 6a12f0e67..f69df5f5c 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 000000000..b1ff3cce3 --- /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 7faf8d8af..06b1baa9d 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 1d1b53bb5..dc60a0912 100644 --- a/extras/volume_id/lib/util.h +++ b/extras/volume_id/lib/util.h @@ -23,10 +23,10 @@ #include #include -#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 4662b210d..9f8e39b51 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 3a7361a6a..2274550c1 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 + * Copyright (C) 2005-2006 Kay Sievers * * 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];