Blame SOURCES/0017-Fstab-allow-leading-whitespace-in-lines-with-spec-54.patch

6e4f25
From 2565e67f724032cdc6217c2a2d2c1bc25ca23605 Mon Sep 17 00:00:00 2001
7b8067
From: Pino Toscano <ptoscano@redhat.com>
7b8067
Date: Tue, 13 Feb 2018 07:21:55 +0100
7b8067
Subject: [PATCH] Fstab: allow leading whitespace in lines with spec (#544)
7b8067
7b8067
The documentation does not explicitly mention this possibility, but
7b8067
tooling that parses fstab actually supports this: hence, allow leading
7b8067
whitespace in lines with filesystem specification.
7b8067
---
7b8067
 lenses/fstab.aug            | 1 +
7b8067
 lenses/tests/test_fstab.aug | 4 ++++
7b8067
 2 files changed, 5 insertions(+)
7b8067
7b8067
diff --git a/lenses/fstab.aug b/lenses/fstab.aug
7b8067
index bceaddd1..d67a3067 100644
7b8067
--- a/lenses/fstab.aug
7b8067
+++ b/lenses/fstab.aug
7b8067
@@ -23,6 +23,7 @@ module Fstab =
7b8067
          Build.opt_list lns comma
7b8067
 
7b8067
   let record = [ seq "mntent" .
7b8067
+                   Util.indent .
7b8067
                    [ label "spec" . store spec ] . sep_tab .
7b8067
                    [ label "file" . store file ] . sep_tab .
7b8067
                    comma_sep_list "vfstype" .
7b8067
diff --git a/lenses/tests/test_fstab.aug b/lenses/tests/test_fstab.aug
7b8067
index fa044aea..438f619a 100644
7b8067
--- a/lenses/tests/test_fstab.aug
7b8067
+++ b/lenses/tests/test_fstab.aug
7b8067
@@ -11,6 +11,8 @@ module Test_fstab =
7b8067
         { "dump" = "1" }
7b8067
         { "passno" = "1" } }
7b8067
 
7b8067
+  let leading_ws = "   /dev/vg00/lv00\t /\t ext3\t    defaults        1 1\n"
7b8067
+
7b8067
   let trailing_ws = "/dev/vg00/lv00\t /\t ext3\t    defaults        1 1  \t\n"
7b8067
 
7b8067
   let gen_no_passno(passno:string) =
7b8067
@@ -60,6 +62,8 @@ module Test_fstab =
7b8067
 
7b8067
   test Fstab.lns get simple = simple_tree
7b8067
 
7b8067
+  test Fstab.lns get leading_ws = simple_tree
7b8067
+
7b8067
   test Fstab.lns get trailing_ws = simple_tree
7b8067
 
7b8067
   test Fstab.lns get no_passno = no_passno_tree
7b8067
-- 
c5f980
2.17.2
7b8067