chiark / gitweb /
generators: add Documentation= fields that point to the generator man pages
[elogind.git] / src / fstab-generator / fstab-generator.c
index c50586b..248a4ce 100644 (file)
@@ -101,7 +101,8 @@ static int add_swap(const char *what, struct mntent *me) {
         fprintf(f,
                 "# Automatically generated by systemd-fstab-generator\n\n"
                 "[Unit]\n"
-                "SourcePath=/etc/fstab\n\n"
+                "SourcePath=/etc/fstab\n"
+                "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n\n"
                 "[Swap]\n"
                 "What=%s\n",
                 what);
@@ -208,10 +209,11 @@ static int add_mount(
         }
 
         fprintf(f,
-              "# Automatically generated by systemd-fstab-generator\n\n"
-              "[Unit]\n"
-              "SourcePath=%s\n",
-              source);
+                "# Automatically generated by systemd-fstab-generator\n\n"
+                "[Unit]\n"
+                "SourcePath=%s\n"
+                "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
+                source);
 
         if (post && !noauto && !nofail && !automount)
                 fprintf(f,
@@ -278,7 +280,8 @@ static int add_mount(
                 fprintf(f,
                         "# Automatically generated by systemd-fstab-generator\n\n"
                         "[Unit]\n"
-                        "SourcePath=%s\n",
+                        "SourcePath=%s\n"
+                        "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
                         source);
 
                 if (post)