Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl2/lvm2/dist Fix build, add missing symbols, remo...



details:   https://anonhg.NetBSD.org/src/rev/e2ffa9f80197
branches:  trunk
changeset: 749535:e2ffa9f80197
user:      haad <haad%NetBSD.org@localhost>
date:      Wed Dec 02 01:53:25 2009 +0000

description:
Fix build, add missing symbols, remove unknown ioctls etc.

diffstat:

 external/gpl2/lvm2/dist/include/configure.h            |  41 +++++++++++++++++-
 external/gpl2/lvm2/dist/include/dm-ioctl.h             |   4 +-
 external/gpl2/lvm2/dist/lib/commands/toolcontext.c     |   4 +-
 external/gpl2/lvm2/dist/lib/device/dev-io.c            |   5 +-
 external/gpl2/lvm2/dist/lib/device/dev-swap.c          |  11 ++++-
 external/gpl2/lvm2/dist/lib/filters/filter_netbsd.c    |  12 ++++-
 external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c |  31 ++++++++++--
 7 files changed, 93 insertions(+), 15 deletions(-)

diffs (truncated from 319 to 300 lines):

diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/include/configure.h
--- a/external/gpl2/lvm2/dist/include/configure.h       Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/include/configure.h       Wed Dec 02 01:53:25 2009 +0000
@@ -1,3 +1,5 @@
+/*     $NetBSD: configure.h,v 1.4 2009/12/02 01:53:25 haad Exp $       */
+
 /* lib/misc/configure.h.  Generated from configure.h.in by configure.  */
 /* lib/misc/configure.h.in.  Generated from configure.in by autoheader.  */
 
@@ -7,6 +9,9 @@
 /* Define to 1 to include built-in support for clustered LVM locking. */
 /* #undef CLUSTER_LOCKING_INTERNAL */
 
+/* Path to cmirrord pidfile. */
+/* #undef CMIRRORD_PIDFILE */
+
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
    */
@@ -15,6 +20,9 @@
 /* Define to 1 if using `alloca.c'. */
 /* #undef C_ALLOCA */
 
+/* Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes. */
+/* #undef DEFAULT_SI_UNIT_CONSISTENCY */
+
 /* Define to 1 to enable LVM2 device-mapper interaction. */
 #define DEVMAPPER_SUPPORT 1
 
@@ -28,7 +36,7 @@
 /* #undef DMEVENTD_PIDFILE */
 
 /* Library version */
-#define DM_LIB_VERSION "1.02.30 (2009-01-26)"
+#define DM_LIB_VERSION "1.02.40 (2009-11-24)"
 
 /* Define to 1 if you have `alloca', as a function or macro. */
 #define HAVE_ALLOCA 1
@@ -46,6 +54,12 @@
 /* Define to 1 if canonicalize_file_name is available. */
 /* #undef HAVE_CANONICALIZE_FILE_NAME */
 
+/* Define to 1 if you have the <ccs.h> header file. */
+/* #undef HAVE_CCS_H */
+
+/* Define to 1 if you have the <corosync/confdb.h> header file. */
+/* #undef HAVE_COROSYNC_CONFDB_H */
+
 /* Define to 1 if you have the <ctype.h> header file. */
 #define HAVE_CTYPE_H 1
 
@@ -91,12 +105,21 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
 
+/* Define to 1 if you have the <libcman.h> header file. */
+/* #undef HAVE_LIBCMAN_H */
+
 /* Define to 1 if dynamic libraries are available. */
 /* #undef HAVE_LIBDL */
 
+/* Define to 1 if you have the <libdlm.h> header file. */
+/* #undef HAVE_LIBDLM_H */
+
 /* Define to 1 if you have the <libgen.h> header file. */
 #define HAVE_LIBGEN_H 1
 
+/* Define to 1 if you have the <libgulm.h> header file. */
+/* #undef HAVE_LIBGULM_H */
+
 /* Define to 1 if you have the <libintl.h> header file. */
 /* #undef HAVE_LIBINTL_H */
 
@@ -192,6 +215,9 @@
 /* Define to 1 if you have the `setlocale' function. */
 #define HAVE_SETLOCALE 1
 
+/* Define to 1 if you have the `siginterrupt' function. */
+#define HAVE_SIGINTERRUPT 1
+
 /* Define to 1 if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
@@ -269,6 +295,9 @@
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #define HAVE_SYS_IOCTL_H 1
 
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+/* #undef HAVE_SYS_IPC_H */
+
 /* Define to 1 if you have the <sys/mman.h> header file. */
 #define HAVE_SYS_MMAN_H 1
 
@@ -288,6 +317,9 @@
 /* Define to 1 if you have the <sys/select.h> header file. */
 /* #undef HAVE_SYS_SELECT_H */
 
+/* Define to 1 if you have the <sys/sem.h> header file. */
+/* #undef HAVE_SYS_SEM_H */
+
 /* Define to 1 if you have the <sys/socket.h> header file. */
 /* #undef HAVE_SYS_SOCKET_H */
 
@@ -321,6 +353,10 @@
 /* Define to 1 if you have the <time.h> header file. */
 #define HAVE_TIME_H 1
 
+/* Define to 1 if libudev's udev_queue_get_udev_is_active function is
+   available. */
+/* #undef HAVE_UDEV_QUEUE_GET_UDEV_IS_ACTIVE */
+
 /* Define to 1 if you have the `uname' function. */
 #define HAVE_UNAME 1
 
@@ -418,6 +454,9 @@
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 /* #undef TM_IN_SYS_TIME */
 
+/* Define to 1 to enable synchronisation with udev processing. */
+/* #undef UDEV_SYNC_SUPPORT */
+
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
 
diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/include/dm-ioctl.h
--- a/external/gpl2/lvm2/dist/include/dm-ioctl.h        Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/include/dm-ioctl.h        Wed Dec 02 01:53:25 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dm-ioctl.h,v 1.4 2009/12/02 00:58:02 haad Exp $        */
+/*     $NetBSD: dm-ioctl.h,v 1.5 2009/12/02 01:53:25 haad Exp $        */
 
 /*
  * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
@@ -270,7 +270,7 @@
 #define DM_DEV_SET_GEOMETRY    _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
 
 #define DM_VERSION_MAJOR       6
-#define DM_VERSION_MINOR       15
+#define DM_VERSION_MINOR       16
 #define DM_VERSION_PATCHLEVEL  0
 #define DM_VERSION_EXTRA       "-ioctl (2009-11-05)"
 
diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/lib/commands/toolcontext.c
--- a/external/gpl2/lvm2/dist/lib/commands/toolcontext.c        Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/lib/commands/toolcontext.c        Wed Dec 02 01:53:25 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: toolcontext.c,v 1.5 2009/12/02 00:58:03 haad Exp $     */
+/*     $NetBSD: toolcontext.c,v 1.6 2009/12/02 01:53:25 haad Exp $     */
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -851,7 +851,7 @@
        struct segment_type *(*init_segtype_fn) (struct cmd_context *);
        struct segment_type *segtype;
 
-       if (!(init_segtype_fn = dlsym(seglib->lib, "init_segtype"))) {
+       if (!(init_segtype_fn = (void *) dlsym(seglib->lib, "init_segtype"))) {
                log_error("Shared library %s does not contain segment type "
                          "functions", seglib->libname);
                return 0;
diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/lib/device/dev-io.c
--- a/external/gpl2/lvm2/dist/lib/device/dev-io.c       Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/lib/device/dev-io.c       Wed Dec 02 01:53:25 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dev-io.c,v 1.5 2009/12/02 00:58:03 haad Exp $  */
+/*     $NetBSD: dev-io.c,v 1.6 2009/12/02 01:53:25 haad Exp $  */
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -306,6 +306,7 @@
 
 static int _dev_read_ahead_dev(struct device *dev, uint32_t *read_ahead)
 {
+#ifdef linux
        long read_ahead_long;
 
        if (dev->read_ahead != -1) {
@@ -331,7 +332,7 @@
 
        log_very_verbose("%s: read_ahead is %u sectors",
                         dev_name(dev), *read_ahead);
-
+#endif
        return 1;
 }
 
diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/lib/device/dev-swap.c
--- a/external/gpl2/lvm2/dist/lib/device/dev-swap.c     Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/lib/device/dev-swap.c     Wed Dec 02 01:53:25 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dev-swap.c,v 1.1.1.1 2009/12/02 00:26:34 haad Exp $    */
+/*     $NetBSD: dev-swap.c,v 1.2 2009/12/02 01:53:25 haad Exp $        */
 
 /*
  * Copyright (C) 2009 Red Hat, Inc. All rights reserved.
@@ -86,4 +86,13 @@
        return 0;
 }
 
+#else
+
+#ifdef __NetBSD__
+int dev_is_swap(struct device *dev, uint64_t *signature)
+{
+       return 0;
+}
 #endif
+       
+#endif
diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/lib/filters/filter_netbsd.c
--- a/external/gpl2/lvm2/dist/lib/filters/filter_netbsd.c       Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/lib/filters/filter_netbsd.c       Wed Dec 02 01:53:25 2009 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: filter_netbsd.c,v 1.2 2009/01/30 09:59:46 haad Exp $        */
+/*      $NetBSD: filter_netbsd.c,v 1.3 2009/12/02 01:53:25 haad Exp $        */
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -54,6 +54,16 @@
        return _md_major;
 }
 
+int dev_subsystem_part_major(const struct device *dev)
+{
+       return 0;
+}
+
+const char *dev_subsystem_name(const struct device *dev)
+{
+       return "";
+}
+
 /*
  * Devices are only checked for partition tables if their minor number
  * is a multiple of the number corresponding to their type below
diff -r 8c9f196dbd33 -r e2ffa9f80197 external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c
--- a/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c    Wed Dec 02 00:59:19 2009 +0000
+++ b/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c    Wed Dec 02 01:53:25 2009 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: libdm-nbsd-iface.c,v 1.3 2009/12/01 23:11:17 haad Exp $        */
+/*      $NetBSD: libdm-nbsd-iface.c,v 1.4 2009/12/02 01:53:25 haad Exp $        */
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -300,6 +300,11 @@
        return 0;
 }
 
+int dm_cookie_supported(void)
+{
+       return (0);
+}
+
 /* Get next target(table description) from list pointed by dmt->head. */
 void *dm_get_next_target(struct dm_task *dmt, void *next,
                         uint64_t *start, uint64_t *length,
@@ -546,6 +551,13 @@
        return 1;
 }
 
+int dm_task_query_inactive_table(struct dm_task *dmt)
+{
+       dmt->query_inactive_table = 1;
+
+       return 1;
+}
+
 int dm_task_set_event_nr(struct dm_task *dmt, uint32_t event_nr)
 {
        dmt->event_nr = event_nr;
@@ -703,6 +715,13 @@
        if (dmt->skip_lockfs)
                flags |= DM_SKIP_LOCKFS_FLAG;
 
+       if (dmt->query_inactive_table) {
+               if (_dm_version_minor < 16)
+                       log_warn("WARNING: Inactive table query unsupported "
+                                "by kernel.  It will use live table.");
+               flags |= DM_QUERY_INACTIVE_TABLE_FLAG;
+       }
+       
        prop_dictionary_set_uint32(dm_dict, DM_IOCTL_FLAGS, flags);
 
        prop_dictionary_set_uint32(dm_dict, DM_IOCTL_EVENT, dmt->event_nr);
@@ -1085,19 +1104,19 @@
        switch (dmt->type) {
        case DM_DEVICE_CREATE:
                add_dev_node(dmt->dev_name, MAJOR(dmi->dev), MINOR(dmi->dev),
-                            dmt->uid, dmt->gid, dmt->mode);
+                   dmt->uid, dmt->gid, dmt->mode, 0);
                break;
 
        case DM_DEVICE_REMOVE:
                /* FIXME Kernel needs to fill in dmi->name */
                if (dmt->dev_name)
-                       rm_dev_node(dmt->dev_name);
+                       rm_dev_node(dmt->dev_name, 0);
                break;
 
        case DM_DEVICE_RENAME:



Home | Main Index | Thread Index | Old Index