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