mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:17:35 +00:00
Userland: Support comments and blank lines in /etc/fstab
This commit is contained in:
parent
93ff911473
commit
1a55264fe6
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,10 @@ bool mount_all()
|
||||||
line_view = line_view.substring_view(0, line_view.length() - 1);
|
line_view = line_view.substring_view(0, line_view.length() - 1);
|
||||||
String line = line_view;
|
String line = line_view;
|
||||||
|
|
||||||
|
// Skip comments and blank lines.
|
||||||
|
if (line.is_empty() || line.starts_with("#"))
|
||||||
|
continue;
|
||||||
|
|
||||||
Vector<String> parts = line.split('\t');
|
Vector<String> parts = line.split('\t');
|
||||||
if (parts.size() < 3) {
|
if (parts.size() < 3) {
|
||||||
fprintf(stderr, "Invalid fstab entry: %s\n", line.characters());
|
fprintf(stderr, "Invalid fstab entry: %s\n", line.characters());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue