summaryrefslogtreecommitdiff
path: root/src/cryptsetup
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-13 17:36:46 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-13 22:04:51 +0100
commited4ad4889723a9acdf75ed86f10cee0024bbbcbc (patch)
treea9cb824bcefb634a8d913b6bd24912eb964ebb3b /src/cryptsetup
parent32c6237a7c2e697d2fc4f3403319db16858fb8e3 (diff)
downloadsystemd-ed4ad4889723a9acdf75ed86f10cee0024bbbcbc.tar.gz
Allow overriding /etc/fstab with $SYSTEMD_FSTAB
Diffstat (limited to 'src/cryptsetup')
-rw-r--r--src/cryptsetup/cryptsetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index dd8c178fcb..dd1504dc9d 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -15,6 +15,7 @@
#include "device-util.h"
#include "escape.h"
#include "fileio.h"
+#include "fstab-util.h"
#include "log.h"
#include "main-func.h"
#include "mount-util.h"
@@ -302,7 +303,7 @@ static char *disk_mount_point(const char *label) {
if (asprintf(&device, "/dev/mapper/%s", label) < 0)
return NULL;
- f = setmntent("/etc/fstab", "re");
+ f = setmntent(fstab_path(), "re");
if (!f)
return NULL;