summaryrefslogtreecommitdiff
path: root/src/uaccess.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uaccess.c')
-rw-r--r--src/uaccess.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/uaccess.c b/src/uaccess.c
index 524e4f0032..392b51604f 100644
--- a/src/uaccess.c
+++ b/src/uaccess.c
@@ -36,14 +36,14 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
- if (argc != 2) {
- log_error("This program expects two argument.");
+ if (argc < 2 || argc > 3) {
+ log_error("This program expects one or two arguments.");
r = -EINVAL;
goto finish;
}
path = argv[1];
- seat = argv[2];
+ seat = argc >= 3 ? argv[2] : "seat0";
p = strappend("/run/systemd/seats/", seat);
if (!p) {