Package: devmapper Version: 2:1.02.25-1 Severity: normal Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu intrepid ubuntu-patch
Hello! The simplified "dmsetup export" patch in the current devmapper still needs to export the DM_TARGET_TYPES variable so that things like error tables and snapshots can be detected. Please see attached (and also consider including the patch from debian bug 455746). Thanks! -- Kees Cook @outflux.net
diff -u devmapper-1.02.25/debian/patches/dmsetup-export.patch devmapper-1.02.25/debian/patches/dmsetup-export.patch --- devmapper-1.02.25/debian/patches/dmsetup-export.patch +++ devmapper-1.02.25/debian/patches/dmsetup-export.patch @@ -1,6 +1,8 @@ ---- a/dmsetup/dmsetup.c -+++ b/dmsetup/dmsetup.c -@@ -1073,6 +1073,57 @@ +Index: devmapper-1.02.25/dmsetup/dmsetup.c +=================================================================== +--- devmapper-1.02.25.orig/dmsetup/dmsetup.c 2008-06-17 21:41:18.000000000 -0700 ++++ devmapper-1.02.25/dmsetup/dmsetup.c 2008-06-17 21:48:59.000000000 -0700 +@@ -1073,6 +1073,78 @@ return r; } @@ -14,6 +16,10 @@ + const char *name = NULL; + const char *uuid; + struct dm_info info; ++ void *next = NULL; ++ uint64_t start, length; ++ char *target_type = NULL; ++ char *params; + + if (argc == 1 && !_switches[UUID_ARG] && !_switches[MAJOR_ARG]) + return 0; @@ -44,6 +50,23 @@ + printf("DM_MAJOR=%d\n", info.major); + printf("DM_MINOR=%d\n", info.minor); + ++ /* export all table types */ ++ if (info.target_count != -1) ++ printf("DM_TARGET_COUNT=%d\n", info.target_count); ++ ++ next = dm_get_next_target(dmt, next, &start, &length, ++ &target_type, ¶ms); ++ if (target_type) { ++ printf("DM_TARGET_TYPES=%s", target_type); ++ while (next) { ++ next = dm_get_next_target(dmt, next, &start, &length, ++ &target_type, ¶ms); ++ if (target_type) ++ printf(",%s", target_type); ++ } ++ printf("\n"); ++ } ++ + if (!(uuid = dm_task_get_uuid(dmt))) + uuid = ""; + printf("DM_UUID=\"%s\"\n", uuid); @@ -58,7 +81,7 @@ /* Show target names and their version numbers */ static int _targets(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) { -@@ -2035,6 +2086,7 @@ +@@ -2035,6 +2107,7 @@ {"targets", "", 0, 0, _targets}, {"version", "", 0, 0, _version}, {"setgeometry", "<device> <cyl> <head> <sect> <start>", 5, 5, _setgeometry},