|Summary:||MSG: improve some argument validity check error messages|
|Product:||systemd||Reporter:||Morten Hustveit <morten.hustveit>|
|Status:||NEW ---||QA Contact:||systemd-bugs|
|i915 platform:||i915 features:|
Description Morten Hustveit 2014-12-11 22:27:46 UTC
Observed behavior: [bob@a00:~]$ sudo systemctl enable /foo/bar.service Failed to execute operation: Invalid argument Expected behvaior: [bob@a00:~]$ sudo systemctl enable /foo/bar.service Unable to create symbolic link /etc/systemd/system/bar.service: target already exists Details: It seems that the systemd code generally passes error information as a single numeric code, even across contexts where the caller cannot know what the error code applies to. This problem is further exacerbated by systemctl itself not doing any work; attempting to run systemctl under strace will not reveal additional context. I would suggest making a per-thread error description string that takes precedence over errno if set, maybe something like this: https://gist.github.com/mortehu/df056c55958723b6836e
Comment 1 Lennart Poettering 2015-02-04 16:47:01 UTC
We actually pass back descriptive dbus errors in many cases, but not in all.