Skip to contentSkip to conversation

devmapper 1.02.03 breaks ABI

DISCUSSION Bastian Blank 2 participants 3 messages Feb 12, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi folks

devmapper 1.02.03 breaks the ABI by removing the exported symbol dm_strdup.

Bastian

Signature · 2 lines
The sight of death frightens them [Earthers].
		-- Kras the Klingon, "Friday's Child", stardate 3497.2
#1 lore raw
Quoted 1 line · Bastian Blank

devmapper 1.02.03 breaks the ABI by removing the exported symbol dm_strdup.

The attached patch reexports dm_strdup.

Bastian

Signature · 2 lines
Insufficient facts always invite danger.
		-- Spock, "Space Seed", stardate 3141.9

=== lib/.exported_symbols
==================================================================

.exported_symbols +1 -0
@@ -70,6 +70,7 @@
 dm_mknodes
 dm_malloc_aux
 dm_malloc_aux_debug
+dm_strdup
 dm_strdup_aux
 dm_free_aux
 dm_realloc_aux

=== lib/Makefile.in
==================================================================

Makefile.in +1 -0
@@ -23,6 +23,7 @@
 	libdm-common.c \
 	libdm-file.c \
 	libdm-deptree.c \
+	mm/abi.c \
 	mm/dbg_malloc.c \
 	mm/pool.c \
 	$(interface)/libdm-iface.c

=== lib/mm/dbg_malloc.c
==================================================================

mm/dbg_malloc.c +6 -0
@@ -18,6 +18,12 @@
 #include <assert.h>
 #include <stdarg.h>
 
+char *dm_strdup_real(const char *str);
+char *dm_strdup_real(const char *str)
+{
+	return dm_strdup(str);
+}
+
 char *dm_strdup_aux(const char *str)
 {
 	char *ret = dm_malloc(strlen(str) + 1);

=== lib/mm/abi.c
==================================================================

mm/abi.c +23 -0
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2006 Bastian Blank
+ *
+ * This file is part of the device-mapper userspace tools.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdarg.h>
+
+char *dm_strdup_real(const char *str);
+
+char *dm_strdup(const char *str)
+{
+	return dm_strdup_real(str);
+}
+
#2 lore raw
In reply to Bastian Blank
Quoted 1 line · Bastian Blank

devmapper 1.02.03 breaks the ABI by removing the exported symbol dm_strdup.

Indeed - 1.02.02 was a development release and there were some problems with the interfaces after the code from LVM2 moved in.

I don't intend to export that function. Parts of the 1.02 interface are still subject to change: The part used in the RHEL4 U3 package (incl. dm_strdup_aux) is now frozen, but the dmeventd extensions will change further.

Alasdair

Signature · 1 line
[email protected]