diff options
Diffstat (limited to 'debian/patches/freebsd-geli.patch')
-rw-r--r-- | debian/patches/freebsd-geli.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/freebsd-geli.patch b/debian/patches/freebsd-geli.patch new file mode 100644 index 0000000..0e71090 --- /dev/null +++ b/debian/patches/freebsd-geli.patch @@ -0,0 +1,38 @@ +From 981a6a2a87a90b25b83ecfc76f5c82c0fadcbbf8 Mon Sep 17 00:00:00 2001 +From: Robert Millan <rmh@debian.org> +Date: Fri, 28 Mar 2014 17:09:51 +0000 +Subject: Detection of GEOM encryption devices (GELI) + +Bug-Debian: http://bugs.debian.org/635393 +Forwarded: no +Last-Update: 2011-07-30 + +Patch-Name: freebsd-geli.patch +--- + libparted/arch/freebsd.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libparted/arch/freebsd.c b/libparted/arch/freebsd.c +index a60b43f8..b78d2bb0 100644 +--- a/libparted/arch/freebsd.c ++++ b/libparted/arch/freebsd.c +@@ -1096,6 +1096,8 @@ _probe_kern_disks () + { + size_t listsize; + char *disklist, *pdisklist, *psave; ++ char buf[PATH_MAX]; ++ struct stat st; + + if (sysctlbyname("kern.disks", NULL, &listsize, NULL, 0) != 0) { + ped_exception_throw ( +@@ -1129,6 +1131,10 @@ _probe_kern_disks () + strncat (dev_name, token, sizeof(dev_name) - strlen(_PATH_DEV) - 1); + dev_name[sizeof(dev_name) - 1] = '\0'; + _ped_device_probe (dev_name); ++ ++ snprintf (buf, sizeof (buf), "%s.eli", dev_name); ++ if (stat (buf, &st) == 0) ++ _ped_device_probe (buf); + } + + free(disklist); |