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

This commit is contained in:
haad 2009-12-02 01:53:25 +00:00
parent 447276ebab
commit 0fa7e5a89a
7 changed files with 93 additions and 15 deletions

View File

@ -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 */

View File

@ -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 @@ enum {
#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)"

View File

@ -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 @@ static int _init_single_segtype(struct cmd_context *cmd,
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;

View File

@ -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_get_size_dev(const struct device *dev, uint64_t *size)
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 @@ static int _dev_read_ahead_dev(struct device *dev, uint32_t *read_ahead)
log_very_verbose("%s: read_ahead is %u sectors",
dev_name(dev), *read_ahead);
#endif
return 1;
}

View File

@ -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 @@ int dev_is_swap(struct device *dev, uint64_t *signature)
return 0;
}
#else
#ifdef __NetBSD__
int dev_is_swap(struct device *dev, uint64_t *signature)
{
return 0;
}
#endif
#endif

View File

@ -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 @@ int md_major(void)
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

View File

@ -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 @@ int dm_check_version(void)
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 @@ int dm_task_skip_lockfs(struct dm_task *dmt)
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 @@ static int _flatten(struct dm_task *dmt, prop_dictionary_t dm_dict)
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 @@ int dm_task_run(struct dm_task *dmt)
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:
/* FIXME Kernel needs to fill in dmi->name */
if (dmt->dev_name)
rename_dev_node(dmt->dev_name, dmt->newname);
rename_dev_node(dmt->dev_name, dmt->newname, 0);
break;
case DM_DEVICE_RESUME:
@ -1110,9 +1129,9 @@ int dm_task_run(struct dm_task *dmt)
if (dmi->flags & DM_EXISTS_FLAG)
add_dev_node(dmi->name, MAJOR(dmi->dev),
MINOR(dmi->dev),
dmt->uid, dmt->gid, dmt->mode);
dmt->uid, dmt->gid, dmt->mode, 0);
else if (dmt->dev_name)
rm_dev_node(dmt->dev_name);
rm_dev_node(dmt->dev_name, 0);
break;
case DM_DEVICE_STATUS: