summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-enable.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-09-21 20:42:06 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-09-22 11:57:51 +0200
commit445d29766a173836b4f4d0205c6d58eaa254f286 (patch)
treecfe46e6ac9ff57fc2b102afd8173c34c50777cbf /src/systemctl/systemctl-enable.c
parentMerge pull request #24751 from medhefgo/stub-x86 (diff)
downloadsystemd-445d29766a173836b4f4d0205c6d58eaa254f286.tar.xz
systemd-445d29766a173836b4f4d0205c6d58eaa254f286.zip
systemctl: Improve link directory separator error message
Let's suggest users try ./<filename> when they encounter this error.
Diffstat (limited to '')
-rw-r--r--src/systemctl/systemctl-enable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c
index a1ca837d4d..730b4a494c 100644
--- a/src/systemctl/systemctl-enable.c
+++ b/src/systemctl/systemctl-enable.c
@@ -25,7 +25,8 @@ static int normalize_filenames(char **names) {
if (!strchr(*u,'/'))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
- "Link argument does contain at least one directory separator: %s",
+ "Link argument must contain at least one directory separator.\n"
+ "If you intended to link a file in the current directory, try ./%s instead.",
*u);
r = path_make_absolute_cwd(*u, &normalized_path);