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)).
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-08-10 08:37:50 +02:00 committed by Lennart Poettering
parent a7a04de0ec
commit b2efed520b

View file

@ -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;