[PATCH] honor DM_DEV_DIR

Guido Guenther agx at sigxcpu.org
Tue May 13 16:46:20 UTC 2008


---
 libparted/arch/linux.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index c98ac77..bec35a7 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -310,6 +310,11 @@ _dm_maptype (PedDevice* dev)
         char *target_type = NULL;
         char *params;
         int r = -1;
+        const char* dev_dir = getenv ("DM_DEV_DIR");
+	
+        if (dev_dir && *dev_dir)
+                if (!dm_set_dev_dir(dev_dir))
+                        return r;
 
         if (!(dmt = dm_task_create(DM_DEVICE_TABLE)))
                 return r;
-- 
1.5.5.1


--LpQ9ahxlCli8rRTG--



More information about the parted-devel mailing list