libos: Support comments in config files
All checks were successful
Build and test / build (push) Successful in 1m45s

This commit is contained in:
apio 2024-09-14 15:12:36 +02:00
parent 4cf39c14a1
commit 12ab71ee40
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 6 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# Configuration file for loginui.
# If this parameter is set to "true", loginui automatically spawns a UI session as the below user instead of prompting for a username and password.
Autologin=true
# The user to create a session for if "Autologin" is set to true (see above). If the username is invalid, loginui will behave as if "Autologin" was set to false.
AutologinUser=selene

View File

@ -28,6 +28,9 @@ namespace os
line.trim("\n");
if (line.is_empty()) continue;
// Skip comment lines.
if (line[0] == '#') continue;
auto parts = TRY(line.split_once('='));
if (parts.size() < 2 || parts[0].is_empty() || parts[1].is_empty()) return err(EINVAL);