Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/lvm2/lib/libdevmapper Remove duplicated netbsd...
details: https://anonhg.NetBSD.org/src/rev/2c5a752efed9
branches: trunk
changeset: 749657:2c5a752efed9
user: haad <haad%NetBSD.org@localhost>
date: Sat Dec 05 11:38:40 2009 +0000
description:
Remove duplicated netbsd-dm.h file it is already installed in include/dev/dm.
Add own libddevmapper library header file libdm-netbsd.h.
diffstat:
external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h | 58 ++++
external/gpl2/lvm2/lib/libdevmapper/netbsd-dm.h | 294 ---------------------
2 files changed, 58 insertions(+), 294 deletions(-)
diffs (truncated from 360 to 300 lines):
diff -r ef3d76a7350b -r 2c5a752efed9 external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/lvm2/lib/libdevmapper/libdm-netbsd.h Sat Dec 05 11:38:40 2009 +0000
@@ -0,0 +1,58 @@
+/* $NetBSD: libdm-netbsd.h,v 1.1 2009/12/05 11:38:40 haad Exp $
+
+/*
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Adam Hamsik.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __LIB_DM_H__
+#define __LIB_DM_H__
+
+#include <prop/proplib.h>
+
+# define MAJOR(x) major((x))
+# define MINOR(x) minor((x))
+# define MKDEV(x,y) makedev((x),(y))
+
+/* Name of device-mapper driver in kernel */
+#define DM_NAME "dm"
+
+/* Types for nbsd_get_dm_major */
+#define DM_CHAR_MAJOR 1
+#define DM_BLOCK_MAJOR 2
+
+/* libdm_netbsd.c */
+int nbsd_get_dm_major(uint32_t *, int); /* Get dm device major numbers */
+
+int nbsd_dmi_add_cmd(const char *, prop_dictionary_t);
+int nbsd_dmi_add_version(const int [3], prop_dictionary_t);
+int nbsd_dm_add_uint(const char *, uint64_t, prop_dictionary_t);
+int nbsd_dm_add_str(const char *, char *, prop_dictionary_t );
+
+struct dm_ioctl* nbsd_dm_dict_to_dmi(prop_dictionary_t, const int);
+
+#endif /* __NETBSD_DM_H__ */
diff -r ef3d76a7350b -r 2c5a752efed9 external/gpl2/lvm2/lib/libdevmapper/netbsd-dm.h
--- a/external/gpl2/lvm2/lib/libdevmapper/netbsd-dm.h Sat Dec 05 11:34:37 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-/* $NetBSD: netbsd-dm.h,v 1.4 2009/12/01 23:12:09 haad Exp $ */
-
-/*
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Adam Hamsik.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __NETBSD_DM_H__
-#define __NETBSD_DM_H__
-
-#include <prop/proplib.h>
-
-#define DM_CMD_LEN 16
-
-#define DM_IOCTL 0xfd
-
-#define DM_IOCTL_CMD 0
-
-#define NETBSD_DM_IOCTL _IOWR(DM_IOCTL, DM_IOCTL_CMD, struct plistref)
-
-
-/*
- * DM-ioctl dictionary.
- *
- * This contains general information about dm device.
- *
- * <dict>
- * <key>command</key>
- * <string>...</string>
- *
- * <key>event_nr</key>
- * <integer>...</integer>
- *
- * <key>name</key>
- * <string>...</string>
- *
- * <key>uuid</key>
- * <string>...</string>
- *
- * <key>dev</key>
- * <integer></integer>
- *
- * <key>flags</key>
- * <integer></integer>
- *
- * <key>version</key>
- * <array>
- * <integer>...</integer>
- * <integer>...</integer>
- * <integer>...</integer>
- * </array>
- *
- * <key>cmd_data</key>
- * <array>
- * <!-- See below for command
- * specific dictionaries -->
- * </array>
- * </dict>
- *
- * Available commands from _cmd_data_v4.
- *
- * create, reload, remove, remove_all, suspend,
- * resume, info, deps, rename, version, status,
- * table, waitevent, names, clear, mknodes,
- * targets, message, setgeometry
- *
- */
-
-/*
- * DM_LIST_VERSIONS == "targets" command dictionary entry.
- * Lists all available targets with their version.
- *
- * <array>
- * <dict>
- * <key>name<key>
- * <string>...</string>
- *
- * <key>version</key>
- * <array>
- * <integer>...</integer>
- * <integer>...</integer>
- * <integer>...</integer>
- * </array>
- * </dict>
- * </array>
- *
- */
-
-/*
- * DM_DEV_LIST == "names"
- * Request list of device-mapper created devices from kernel.
- *
- * <array>
- * <dict>
- * <key>name<key>
- * <string>...</string>
- *
- * <key>dev</key>
- * <integer>...</integer>
- * </dict>
- * </array>
- *
- * dev is uint64_t
- *
- */
-
- /*
- * DM_DEV_RENAME == "rename"
- * Rename device to string.
- *
- * <array>
- * <string>...</string>
- * </array>
- *
- */
-
- /*
- * DM_DEV_STATUS == "info, mknodes"
- * Will change fields DM_IOCTL_OPEN, DM_IOCTL_DEV in received dictionary,
- * with dm device values with name or uuid from list.
- *
- */
-
- /*
- * DM_TABLE_STATUS == "status,table"
- * Request list of device-mapper created devices from kernel.
- *
- * <array>
- * <dict>
- * <key>type<key>
- * <string>...</string>
- *
- * <key>start</key>
- * <integer>...</integer>
- *
- * <key>length</key>
- * <integer>...</integer>
- *
- * <key>params</key>
- * <string>...</string>
- * </dict>
- * </array>
- *
- * params is string which contains {device} {parameters}
- *
- */
-
- /*
- * DM_TABLE_DEPS == "deps"
- * Request list active table device dependiences.
- *
- * This command is also run to get dm-device
- * dependiences for existing real block device.
- *
- * eg. vgcreate calls DM_TABLE_DEPS
- *
- * <array>
- * <integer>...</integer>
- * </array>
- *
- */
-
-
-#define DM_IOCTL_COMMAND "command"
-#define DM_IOCTL_VERSION "version"
-#define DM_IOCTL_OPEN "open_count"
-#define DM_IOCTL_MINOR "minor"
-#define DM_IOCTL_NAME "name"
-#define DM_IOCTL_UUID "uuid"
-#define DM_IOCTL_TARGET_COUNT "target_count"
-#define DM_IOCTL_EVENT "event_nr"
-#define DM_IOCTL_FLAGS "flags"
-#define DM_IOCTL_CMD_DATA "cmd_data"
-
-#define DM_TARGETS_NAME "name"
-#define DM_TARGETS_VERSION "ver"
-
-#define DM_DEV_NEWNAME "newname"
-#define DM_DEV_NAME "name"
-#define DM_DEV_DEV "dev"
-
-#define DM_TABLE_TYPE "type"
-#define DM_TABLE_START "start"
-#define DM_TABLE_STAT "status"
-#define DM_TABLE_LENGTH "length"
-#define DM_TABLE_PARAMS "params"
-
-#define DM_TARGET_LINEAR_DEVICE "device"
-#define DM_TARGET_LINEAR_OFFSET "offset"
-
-#define DM_TARGET_STRIPE_DEVARRAY "device_array"
-#define DM_TARGET_STRIPE_DEVICE "device"
-#define DM_TARGET_STRIPE_OFFSET "offset"
-#define DM_TARGET_STRIPE_STRIPES "stripes"
-#define DM_TARGET_STRIPE_CHUNKSIZE "chunk_size"
-
-
-//#ifndef __LIB_DEVMAPPER__
-//#define DM_TABLE_DEPS "deps"
-//#endif
-
-/* Status bits */
-/* IO mode of device */
-#define DM_READONLY_FLAG (1 << 0) /* In/Out *//* to kernel/from kernel */
-#define DM_SUSPEND_FLAG (1 << 1) /* In/Out */
-/* XXX. This flag is undocumented. */
-#define DM_EXISTS_FLAG (1 << 2) /* In/Out */
-/* Minor number is persistent */
-#define DM_PERSISTENT_DEV_FLAG (1 << 3) /* In */
-
Home |
Main Index |
Thread Index |
Old Index