summaryrefslogtreecommitdiff
path: root/src/fstab-generator
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-08-10 08:37:50 +0200
committerLennart Poettering <lennart@poettering.net>2021-08-10 13:29:08 +0200
commitb2efed520b51f71484e45289f9f34b611838cd4a (patch)
treece8a1211ea194fc5958fa48b7cd31654112fa993 /src/fstab-generator
parenta7a04de0ec06e7add02d48092986ff74c8196e42 (diff)
downloadsystemd-b2efed520b51f71484e45289f9f34b611838cd4a.tar.gz
fstab-generator: put What= before Where=
All units in units/ follow this pattern, as do all other generators that we provide. The question of the order was raised in https://github.com/systemd/zram-generator/pull/90#discussion_r684965984, and I think it's nice to make it consistent everywhere (What= before Where= matches mount(8) and fstab(5)).
Diffstat (limited to 'src/fstab-generator')
-rw-r--r--src/fstab-generator/fstab-generator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index bafc7b8f96..bae67be09f 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -451,6 +451,10 @@ static int add_mount(
"\n"
"[Mount]\n");
+ r = write_what(f, what);
+ if (r < 0)
+ return r;
+
if (original_where)
fprintf(f, "# Canonicalized from %s\n", original_where);
@@ -459,10 +463,6 @@ static int add_mount(
return log_oom();
fprintf(f, "Where=%s\n", where_escaped);
- r = write_what(f, what);
- if (r < 0)
- return r;
-
if (!isempty(fstype) && !streq(fstype, "auto")) {
_cleanup_free_ char *t = NULL;