diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-02-07 01:54:06 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-02-07 01:54:06 +0000 |
commit | 265222369791f848167f8695762305dd3fab5bd6 (patch) | |
tree | 6faaebbb21ba356fc8cd9304614bda627327726a /sys-fs | |
parent | Marking mod_perl-2.0.3-r2 ppc64 for bug 209179 (diff) | |
download | historical-265222369791f848167f8695762305dd3fab5bd6.tar.gz historical-265222369791f848167f8695762305dd3fab5bd6.tar.bz2 historical-265222369791f848167f8695762305dd3fab5bd6.zip |
Version bump, related to bug #207612.
Package-Manager: portage-2.1.4.1
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/device-mapper/ChangeLog | 9 | ||||
-rw-r--r-- | sys-fs/device-mapper/Manifest | 15 | ||||
-rw-r--r-- | sys-fs/device-mapper/device-mapper-1.02.24.ebuild | 70 | ||||
-rw-r--r-- | sys-fs/device-mapper/files/device-mapper-1.02.24-export-format.diff | 300 |
4 files changed, 382 insertions, 12 deletions
diff --git a/sys-fs/device-mapper/ChangeLog b/sys-fs/device-mapper/ChangeLog index 9d91db60a432..51a0620502e0 100644 --- a/sys-fs/device-mapper/ChangeLog +++ b/sys-fs/device-mapper/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-fs/device-mapper # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/ChangeLog,v 1.104 2008/02/01 12:39:47 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/ChangeLog,v 1.105 2008/02/07 01:54:05 robbat2 Exp $ + +*device-mapper-1.02.24 (07 Feb 2008) + + 07 Feb 2008; Robin H. Johnson <robbat2@gentoo.org> + +files/device-mapper-1.02.24-export-format.diff, + +device-mapper-1.02.24.ebuild: + Version bump, related to bug #207612. 01 Feb 2008; Diego Pettenò <flameeyes@gentoo.org> files/device-mapper.rc-1.02.22-r3, files/device-mapper.rc: diff --git a/sys-fs/device-mapper/Manifest b/sys-fs/device-mapper/Manifest index fec3e926c71a..20f800344537 100644 --- a/sys-fs/device-mapper/Manifest +++ b/sys-fs/device-mapper/Manifest @@ -1,12 +1,10 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX 1.02.22-dmeventd.initd 547 RMD160 dd73fd37016d4e3a168009574651bf31f5ec0189 SHA1 dcd11d182a3888f2efdbb535ee9f3bb5ebb4ee46 SHA256 6b55e8cac8f47ea7c00ef66ce078826628842b6d13bbebed875bec2188b5e675 AUX 64-device-mapper.rules-1.02.19 1247 RMD160 2fc15996575c44ffb5a12c16236e221157ff15e6 SHA1 67cd5da22219dba8232e7a95bd7f328d6eb30d90 SHA256 b8a7570321c735b06cfa97cff10a8edffcf508d4e54bd6730e482cb7bdd25347 AUX 64-device-mapper.rules-1.02.22 999 RMD160 e29014e213c2d41ae360419c038d5644cd931021 SHA1 f3542c4294dcf4e2c4f50d3421b5399f5ab06975 SHA256 84544cac9d4de6cfc44cec816836f194f5f69fbb74cbdd07073f96dae427c0ed AUX 64-device-mapper.rules-1.02.22-r5 1010 RMD160 3dbb70b60b0c86a77fb9d0e8a0a9cd16a7dd03cc SHA1 fec62b9d4357fe4160e3d017c103767b6c9bf232 SHA256 7c92c2ff3c8dee6588ac51f8367a7b4bcb31d42f2d306ed08ce01be809b9ffcd AUX device-mapper-1.02.22-export-format-r1.diff 11073 RMD160 ac3adb7316dc4f6bb7e9ea3bcf54f8b8b878570d SHA1 208c3f92a9a257e62fb6f7b8600b22b486d473bb SHA256 8b071762684b9c72dafe7bbd0e9a508999d3d0bc34ced088baa7a206d859f331 AUX device-mapper-1.02.22-export-format.diff 11410 RMD160 dac695aa0eef0adfa1dafea428a8c7412d96ebee SHA1 d46b4c791a4f53c932d3664362e123eecf2c39cc SHA256 e7ded5533a0a6409be967e259ecea39395e783686431567112744743d3b9e553 +AUX device-mapper-1.02.24-export-format.diff 11126 RMD160 28fe4d018152f4a36b07106b8323ab5ec0a0cb7b SHA1 5d0a88f91164082297f8b86450ccfeebc2f34dde SHA256 30e6c0c153bdcd68681ec5a0ebf2c2aee21daa2f22759f82b432e412183d2754 AUX device-mapper.conf-1.02.22-r3 15 RMD160 1954cbfeea6eeed764a6344039d9c1eb58f7b00a SHA1 0dd47dfb811946a11fbde987e2ce1e105ed7fafb SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 AUX device-mapper.rc 615 RMD160 741f1f771665e33f995442567376060a749d56c1 SHA1 a44e73c73865757d8d00161bc07374de535e70bd SHA256 730753883de0e992a0bfa31038780edf31d0957fdbef304fd8880c6d0dc7798e AUX device-mapper.rc-1.02.22-r3 620 RMD160 9764c73cf28a20c2b21ddc5e76b5ee7e23ca6ac4 SHA1 d0f9e04adae75a74225831e33520d378f36f7355 SHA256 db8f0867bb4c35c53a59944bdb6c64844b044a937fa7ce43f1bc35f17268b6bc @@ -14,6 +12,7 @@ AUX dm-start.sh 2124 RMD160 c545e6ffafba981baf60b0fae68492dc7fd98b19 SHA1 59afed AUX dmtab 426 RMD160 59b4a51881ec14c393f1a043d39732246854173e SHA1 042a5e3c539dd17f30718f6b60635a6c1fa4ddaa SHA256 a7d5976c780b23193ec78146e4ed12e0cd0deca853ee0198baa4eeaf2cdc53f2 DIST device-mapper.1.02.19.tgz 183064 RMD160 00b584c67856ab18323bcc2918aed5ac4198cb65 SHA1 8b779c24a63630065fca97cca14d5630ccb9ad9d SHA256 4723a4ba55e10c58a4e1bd7551e1e7d90ce43d3fcdabfd78285d39c2d33cdead DIST device-mapper.1.02.22.tgz 189726 RMD160 8bf9986536c49f53c398d6a2180e21e1235bea18 SHA1 a4533872c32951a1b549bb9207a13b7e4dae0701 SHA256 ff833a6cd6246686f5b3f5692fd6597f1ffbc60f08929e5fe68304cdafb61595 +DIST device-mapper.1.02.24.tgz 192995 RMD160 fa73dd0bd973c6e6f2dabbb065aa176a2a5ea3a4 SHA1 b22e76bd07b41f46a6d4a3d06429d9787fc4987f SHA256 a0bd3de63e0d12da8d82153a2e3b53e59d92e0fc52712a4fa0f997f6d5baaa56 EBUILD device-mapper-1.02.19-r1.ebuild 1739 RMD160 59d0786bbec0a0572c9c41935fd681f0e8235b6c SHA1 de5e8c959fae34ab3a2b684fe5211e763f69008f SHA256 90de2882a1ca5a279ac15650a5e0212e7997ee3bb0fab018a79f2400fc6f4f08 EBUILD device-mapper-1.02.19.ebuild 1631 RMD160 ebb985a60f5f098e7322e8602bd9f5f403bf3fb8 SHA1 1049f88ec398bc2642fad01375424d0339248ed1 SHA256 b66cb6d9c7ecc5b769667f6884e5b9462dabcaa7ae6f4e196d70421a1f1ede71 EBUILD device-mapper-1.02.22-r1.ebuild 2029 RMD160 f8f7a284100d366f700b5419c1065dee2e90d70e SHA1 a0aad925f78e61908ef505697ec038ebd1418774 SHA256 0f383d1be0f8f2111aca9a32f7a01487779ec493f7d6b290a92cbfd56920369d @@ -21,12 +20,6 @@ EBUILD device-mapper-1.02.22-r3.ebuild 2114 RMD160 05edc7bc37b684d4209003a007dc3 EBUILD device-mapper-1.02.22-r4.ebuild 2117 RMD160 5f50d27861e038034db772ff7450a10ba5ef5ec1 SHA1 d1f052647bf1a71e0bf94b0e5e9e35f9667e1522 SHA256 b5abf6b8adce7a9a05a7114dd7d65aa69479d065c1d8cdec2e885f8f48ada901 EBUILD device-mapper-1.02.22-r5.ebuild 2151 RMD160 ba0f248da86ea98e6e4fe82cc69a1eb123574a60 SHA1 2ccfe32d1f01d734e29d6793017388bf0e778b3e SHA256 fcf49d048dd2be54a3819da662916b49feefc485031e79e02d43403494c8f9b2 EBUILD device-mapper-1.02.22.ebuild 1853 RMD160 a9d4a38a94e59535f65c4925e6296380c9037e77 SHA1 7ebfcbc91a491faefc310d234e49fd1559615c60 SHA256 3b047a69a1c0d04b88531f379505fbbf22ed5b4d23aee57f70245e118a26c715 -MISC ChangeLog 18779 RMD160 70522131129912ff2369e4b0478fc130f77c5e28 SHA1 a7dcaef055797dcb8ba1c162b392282882894337 SHA256 8e797e500a9a4de9505b826b24a1897f0ad22996716819df15230c920b085808 +EBUILD device-mapper-1.02.24.ebuild 2172 RMD160 df8dc287151ac787ce06eafc2e2c7d84e2a52c58 SHA1 e96f91e97990283ab4fad2b9c6afface910ca567 SHA256 f92b915d0a677b7da38c5cf9de141c0254d245de45a4bb4a2967998bf4821cd2 +MISC ChangeLog 18993 RMD160 58cf3335276d7193ff71bce5235444ae7747c028 SHA1 825157d61e21cc428f638b10eb19265649da51c7 SHA256 dbae8587f0d9b2e95118637a65824c4a42b00e67e63321c2ca9b4343f1f8ef12 MISC metadata.xml 300 RMD160 ede7eb0cde3ab4e83a90578f08e068486a2a59cd SHA1 2f199ce422f4fad87bcbdcb681d8197620bae236 SHA256 4f6e65a7f6e72548a3d0c35a34f7a119dc7f5c13dfc0820939bc8d1b72b75a4d ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.7 (GNU/Linux) - -iD8DBQFHoxMYAiZjviIA2XgRAicRAJsFYXs+jcCbdXjNKdN2W+TXddSWXwCfR3ou -5qSBIh2saUq1k9232dXkB8Q= -=U4BX ------END PGP SIGNATURE----- diff --git a/sys-fs/device-mapper/device-mapper-1.02.24.ebuild b/sys-fs/device-mapper/device-mapper-1.02.24.ebuild new file mode 100644 index 000000000000..1a63a1f797e7 --- /dev/null +++ b/sys-fs/device-mapper/device-mapper-1.02.24.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/device-mapper-1.02.24.ebuild,v 1.1 2008/02/07 01:54:05 robbat2 Exp $ + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Device mapper ioctl library for use with LVM2 utilities" +HOMEPAGE="http://sources.redhat.com/dm/" +SRC_URI="ftp://sources.redhat.com/pub/dm/${PN}.${PV}.tgz + ftp://sources.redhat.com/pub/dm/old/${PN}.${PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="selinux" + +DEPEND="selinux? ( sys-libs/libselinux )" +RDEPEND="!<sys-fs/udev-115-r1 + ${DEPEND}" + +S="${WORKDIR}/${PN}.${PV}" + +src_unpack() { + unpack ${A} + EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/device-mapper-1.02.24-export-format.diff +} + +src_compile() { + econf --sbindir=/sbin $(use_enable selinux) --enable-dmeventd || die "econf failed" + emake || die "compile problem" +} + +src_install() { + emake install DESTDIR="${D}" || die + + # move shared libs to / + mv "${D}"/usr/$(get_libdir) "${D}"/ || die "move libdir" + dolib.a lib/ioctl/libdevmapper.a || die "dolib.a" + gen_usr_ldscript libdevmapper.so + + insinto /etc + doins "${FILESDIR}"/dmtab + insinto /lib/rcscripts/addons + doins "${FILESDIR}"/dm-start.sh + + newinitd "${FILESDIR}"/device-mapper.rc-1.02.22-r3 device-mapper || die + newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die + + newinitd "${FILESDIR}"/1.02.22-dmeventd.initd dmeventd || die + dolib.a dmeventd/libdevmapper-event.a || die + gen_usr_ldscript libdevmapper-event.so + + insinto /etc/udev/rules.d/ + newins "${FILESDIR}"/64-device-mapper.rules-1.02.22-r5 64-device-mapper.rules + + dodoc INSTALL INTRO README VERSION WHATS_NEW +} + +pkg_preinst() { + local l="${ROOT}"/$(get_libdir)/libdevmapper.so.1.01 + [[ -e ${l} ]] && cp "${l}" "${D}"/$(get_libdir)/ +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/libdevmapper.so.1.01 + + elog "device-mapper volumes are no longer automatically created for" + elog "baselayout-2 users. If you are using baselayout-2, be sure to" + elog "run: # rc-update add device-mapper boot" +} diff --git a/sys-fs/device-mapper/files/device-mapper-1.02.24-export-format.diff b/sys-fs/device-mapper/files/device-mapper-1.02.24-export-format.diff new file mode 100644 index 000000000000..c92b0c5a943b --- /dev/null +++ b/sys-fs/device-mapper/files/device-mapper-1.02.24-export-format.diff @@ -0,0 +1,300 @@ +diff -Nuar --exclude '*.rej' --exclude '*.orig' device-mapper.1.02.24.orig/dmsetup/dmsetup.c device-mapper.1.02.24/dmsetup/dmsetup.c +--- device-mapper.1.02.24.orig/dmsetup/dmsetup.c 2007-12-05 09:05:04.000000000 -0800 ++++ device-mapper.1.02.24/dmsetup/dmsetup.c 2008-02-06 17:49:04.670645367 -0800 +@@ -108,6 +108,7 @@ + enum { + READ_ONLY = 0, + COLS_ARG, ++ EXPORT_ARG, + EXEC_ARG, + FORCE_ARG, + GID_ARG, +@@ -139,7 +140,8 @@ + DR_TASK = 1, + DR_INFO = 2, + DR_DEPS = 4, +- DR_TREE = 8 /* Complete dependency tree required */ ++ DR_TREE = 8, /* Complete dependency tree required */ ++ DR_TABLE = 0x10, /* table is required, not just info */ + } report_type_t; + + static int _switches[NUM_SWITCHES]; +@@ -1123,8 +1125,13 @@ + name = argv[1]; + } + +- if (!(dmt = dm_task_create(DM_DEVICE_INFO))) +- return 0; ++ if (_report_type & DR_TABLE ) { ++ if (!(dmt = dm_task_create(DM_DEVICE_TABLE))) ++ return 0; ++ } else { ++ if (!(dmt = dm_task_create(DM_DEVICE_INFO))) ++ return 0; ++ } + + if (!_set_task_device(dmt, name, 0)) + goto out; +@@ -1588,6 +1595,16 @@ + return dm_report_field_uint32(rh, field, &value); + } + ++static int _int_disp(struct dm_report *rh, ++ struct dm_pool *mem __attribute((unused)), ++ struct dm_report_field *field, const void *data, ++ void *private __attribute((unused))) ++{ ++ const int value = *(const int *)data; ++ ++ return dm_report_field_int(rh, field, &value); ++} ++ + static int _dm_name_disp(struct dm_report *rh, + struct dm_pool *mem __attribute((unused)), + struct dm_report_field *field, const void *data, +@@ -1642,6 +1659,66 @@ + return dm_report_field_string(rh, field, &s); + } + ++static int _dm_info_cleartext_status_disp(struct dm_report *rh, ++ struct dm_pool *mem __attribute((unused)), ++ struct dm_report_field *field, const void *data, ++ void *private __attribute((unused))) ++{ ++ const char *buf = "NOTPRESENT"; ++ const struct dm_info *info = data; ++ ++ if (info->exists) { ++ if (info->suspended) ++ buf = "SUSPENDED"; ++ else ++ buf = info->read_only ? " READONLY" : "ACTIVE"; ++ } ++ ++ return dm_report_field_string(rh, field, &buf); ++} ++ ++static int _dm_info_target_types_disp(struct dm_report *rh, ++ struct dm_pool *mem __attribute((unused)), ++ struct dm_report_field *field, const void *data, ++ void *private __attribute((unused))) ++{ ++ char buf[1024]; ++ char *dest = buf; ++ int remains = sizeof(buf); ++ int written; ++ const char *s = buf; ++ struct dm_task *dmt = (struct dm_task *) data; ++ void *next = NULL; ++ uint64_t start, length; ++ char *target_type = NULL; ++ char *params; ++ ++ ++ buf[0] = '\0'; ++ ++ next = dm_get_next_target(dmt, next, &start, &length, ++ &target_type, ¶ms); ++ if (target_type) { ++ written = snprintf(dest, remains, "%s", target_type); ++ dest += written; ++ remains -= written; ++ ++ while (remains > 0 && next) { ++ next = dm_get_next_target(dmt, next, &start, &length, ++ &target_type, ¶ms); ++ if (target_type) { ++ written = snprintf(dest, remains, ",%s", target_type); ++ dest += written; ++ remains -= written; ++ } ++ } ++ } ++ ++ buf[sizeof(buf)-1] = '\0'; ++ ++ return dm_report_field_string(rh, field, &s); ++} ++ + static int _dm_info_devno_disp(struct dm_report *rh, struct dm_pool *mem, + struct dm_report_field *field, const void *data, + void *private) +@@ -1865,11 +1942,12 @@ + { DR_INFO, "Mapped Device Information", "", _info_get_obj }, + { DR_DEPS, "Mapped Device Relationship Information", "", _deps_get_obj }, + { DR_TREE, "Mapped Device Relationship Information", "", _tree_get_obj }, ++ { DR_TABLE, "Mapped Device Table", "", _task_get_obj }, + { 0, "", "", NULL }, + }; + + /* Column definitions */ +-#define OFFSET_OF(strct, field) ((unsigned int) &((struct strct *)NULL)->field) ++#define OFFSET_OF(strct, field) ((unsigned long) &((struct strct *)NULL)->field) + #define STR (DM_REPORT_FIELD_TYPE_STRING) + #define NUM (DM_REPORT_FIELD_TYPE_NUMBER) + #define FIELD_O(type, strct, sorttype, head, field, width, func, id, desc) {DR_ ## type, sorttype, OFFSET_OF(strct, field), width, id, head, &_ ## func ## _disp, desc}, +@@ -1884,6 +1962,7 @@ + FIELD_F(TASK, NUM, "RAhead", 6, dm_read_ahead, "read_ahead", "Read ahead in sectors.") + + FIELD_F(INFO, STR, "Stat", 4, dm_info_status, "attr", "(L)ive, (I)nactive, (s)uspended, (r)ead-only, read-(w)rite.") ++FIELD_F(INFO, STR, "State", 1, dm_info_cleartext_status, "status", "State as cleartext.") + FIELD_F(INFO, STR, "DevNo", 5, dm_info_devno, "devno", "Device major and minor numbers") + FIELD_O(INFO, dm_info, NUM, "Maj", major, 3, int32, "major", "Block device major number.") + FIELD_O(INFO, dm_info, NUM, "Min", minor, 3, int32, "minor", "Block device minor number.") +@@ -1891,6 +1970,11 @@ + FIELD_O(INFO, dm_info, NUM, "Targ", target_count, 4, int32, "segments", "Number of segments in live table, if present.") + FIELD_O(INFO, dm_info, NUM, "Event", event_nr, 6, uint32, "events", "Number of most recent event.") + ++FIELD_O(INFO, dm_info, NUM, "RO", read_only, 2, int, "read_only", "Read only.") ++FIELD_O(INFO, dm_info, NUM, "Ex", exists, 2, int, "exists", "Exists.") ++FIELD_O(INFO, dm_info, NUM, "Susp", suspended, 4, int, "suspended", "Suspended.") ++FIELD_O(INFO, dm_info, NUM, "tab_live", live_table, 8, int, "table_live", "Live table.") ++FIELD_O(INFO, dm_info, NUM, "tab_inact", inactive_table, 9, int, "table_inactive", "Inactive table.") + FIELD_O(DEPS, dm_deps, NUM, "#Devs", count, 5, int32, "device_count", "Number of devices used by this one.") + FIELD_F(TREE, STR, "DevNames", 8, dm_deps_names, "devs_used", "List of names of mapped devices used by this one.") + FIELD_F(DEPS, STR, "DevNos", 6, dm_deps, "devnos_used", "List of device numbers of devices used by this one.") +@@ -1898,6 +1982,7 @@ + FIELD_F(TREE, NUM, "#Refs", 5, dm_tree_parents_count, "device_ref_count", "Number of mapped devices referencing this one.") + FIELD_F(TREE, STR, "RefNames", 8, dm_tree_parents_names, "names_using_dev", "List of names of mapped devices using this one.") + FIELD_F(TREE, STR, "RefDevNos", 9, dm_tree_parents_devs, "devnos_using_dev", "List of device numbers of mapped devices using this one.") ++FIELD_F(TABLE, STR, "Targettypes", 32, dm_info_target_types, "target_types", "Used target types.") + {0, 0, 0, 0, "", "", NULL, NULL}, + /* *INDENT-ON* */ + }; +@@ -1908,13 +1993,15 @@ + #undef FIELD_F + + static const char *default_report_options = "name,major,minor,attr,open,segments,events,uuid"; ++static const char *default_export_options = "name,major,minor,status,read_only,exists,suspended,table_live,table_inactive,open,segments,events,uuid,target_types"; + + static int _report_init(struct command *c) + { +- char *options = (char *) default_report_options; ++ char *default_options = (char *) default_report_options; ++ char *options; + const char *keys = ""; + const char *separator = " "; +- int aligned = 1, headings = 1, buffered = 1; ++ int aligned = 1, headings = 1, buffered = 1, export = 0; + uint32_t flags = 0; + size_t len = 0; + int r = 0; +@@ -1929,6 +2016,15 @@ + if (_switches[UNBUFFERED_ARG]) + buffered = 0; + ++ if (_switches[EXPORT_ARG]) { ++ default_options = (char *) default_export_options; ++ separator = "\n"; ++ aligned = 0; ++ headings = 0; ++ export = 1; ++ } ++ ++ options = default_options; + if (_switches[OPTIONS_ARG] && _string_args[OPTIONS_ARG]) { + if (*_string_args[OPTIONS_ARG] != '+') + options = _string_args[OPTIONS_ARG]; +@@ -1971,6 +2067,9 @@ + if (headings) + flags |= DM_REPORT_OUTPUT_HEADINGS; + ++ if (export) ++ flags |= DM_REPORT_OUTPUT_EXPORT; ++ + if (!(_report = dm_report_init(&_report_type, + _report_types, _report_fields, + options, separator, flags, keys, NULL))) +@@ -2046,7 +2145,8 @@ + fprintf(out, "dmsetup [--version] [-v|--verbose [-v|--verbose ...]]\n" + " [-r|--readonly] [--noopencount] [--nolockfs]\n" + " [--readahead [+]<sectors>|auto|none]\n" +- " [-c|-C|--columns] [-o <fields>] [-O|--sort <sort_fields>]\n" ++ " [-c|-C|--columns] [-e|--export]\n" ++ " [-o <fields>] [-O|--sort <sort_fields>]\n" + " [--noheadings] [--separator <separator>]\n\n"); + for (i = 0; _commands[i].name; i++) + fprintf(out, "\t%s %s\n", _commands[i].name, _commands[i].help); +@@ -2397,6 +2497,7 @@ + static struct option long_options[] = { + {"readonly", 0, &ind, READ_ONLY}, + {"columns", 0, &ind, COLS_ARG}, ++ {"export", 0, &ind, EXPORT_ARG}, + {"exec", 1, &ind, EXEC_ARG}, + {"force", 0, &ind, FORCE_ARG}, + {"gid", 1, &ind, GID_ARG}, +@@ -2476,12 +2577,16 @@ + + optarg = 0; + optind = OPTIND_INIT; +- while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfGj:m:Mno:O:ru:Uv", ++ while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCefGj:m:Mno:O:ru:Uv", + long_options, NULL)) != -1) { + if (c == ':' || c == '?') + return 0; + if (c == 'c' || c == 'C' || ind == COLS_ARG) + _switches[COLS_ARG]++; ++ if (c == 'e' || ind == EXPORT_ARG) { ++ _switches[EXPORT_ARG]++; ++ _switches[COLS_ARG]++; ++ } + if (c == 'f' || ind == FORCE_ARG) + _switches[FORCE_ARG]++; + if (c == 'r' || ind == READ_ONLY) +diff -Nuar --exclude '*.rej' --exclude '*.orig' device-mapper.1.02.24.orig/lib/libdevmapper.h device-mapper.1.02.24/lib/libdevmapper.h +--- device-mapper.1.02.24.orig/lib/libdevmapper.h 2007-12-05 08:28:19.000000000 -0800 ++++ device-mapper.1.02.24/lib/libdevmapper.h 2008-02-06 17:48:06.670426177 -0800 +@@ -738,6 +738,7 @@ + #define DM_REPORT_OUTPUT_ALIGNED 0x00000001 + #define DM_REPORT_OUTPUT_BUFFERED 0x00000002 + #define DM_REPORT_OUTPUT_HEADINGS 0x00000004 ++#define DM_REPORT_OUTPUT_EXPORT 0x00000008 + + struct dm_report *dm_report_init(uint32_t *report_types, + const struct dm_report_object_type *types, +diff -Nuar --exclude '*.rej' --exclude '*.orig' device-mapper.1.02.24.orig/lib/libdm-report.c device-mapper.1.02.24/lib/libdm-report.c +--- device-mapper.1.02.24.orig/lib/libdm-report.c 2007-08-21 09:26:06.000000000 -0700 ++++ device-mapper.1.02.24/lib/libdm-report.c 2008-02-06 17:48:06.670426177 -0800 +@@ -13,6 +13,7 @@ + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#include <ctype.h> + #include "libdevmapper.h" + #include "list.h" + #include "log.h" +@@ -776,6 +777,8 @@ + char buf[4096]; + int32_t width; + uint32_t align; ++ const char *fname; ++ char tmp_char; + + if (list_empty(&rh->rows)) + return 1; +@@ -800,6 +803,25 @@ + if (field->props->flags & FLD_HIDDEN) + continue; + ++ if (rh->flags & DM_REPORT_OUTPUT_EXPORT) { ++ fname = rh->fields[field->props->field_num].id; ++ if (!dm_pool_grow_object(rh->mem, "DM_", strlen("DM_"))) { ++ log_error("dm_report: Unable to extend output line"); ++ goto bad; ++ } ++ while (fname && fname[0]) { ++ tmp_char = toupper(fname[0]); ++ if (!dm_pool_grow_object(rh->mem, &tmp_char, 1)) { ++ log_error("dm_report: Unable to extend output line"); ++ goto bad; ++ } ++ fname++; ++ } ++ if (!dm_pool_grow_object(rh->mem, "=", strlen("="))) { ++ log_error("dm_report: Unable to extend output line"); ++ goto bad; ++ } ++ } + repstr = field->report_string; + width = field->props->width; + if (!(rh->flags & DM_REPORT_OUTPUT_ALIGNED)) { |