On Tue, 10.09.13 02:30, Jan Engelhardt ([email protected]) wrote: > > > On Tuesday 2013-09-10 02:20, Lennart Poettering wrote: > >On Sun, 08.09.13 14:29, Jan Engelhardt wrote: > >> > >> Speaking of which, systemctl would help debugging a lot better if it > >> told the user what strange file it did not find. > > > >We are currently not good at generating nicely readable human D-Bus > >error strings. Patches welcome. > > Can you tell me the location in source of the _sender_ side of > this particular reported case?
unit_file_enable() (and related calls) should probably gain a new DBusError parameter that is (optionally) filled in when a good error string is avilable. That function is defined in src/shared/install.c and invoked from src/core/dbus-manager.c's bus_manager_message_handler(). We generally return negative errno-style error codes from all functions (like the kernel does). But some relevant functions additionally take a DBusError that may be passed and that they can (but don't have to) fill in if they want. bus_send_error_reply() then takes the DBusError and sends it back to the user -- if it is set. If it isn't it generates one from the return returned negative errno code as fallack. unit_file_enable() currently only returns the negative errno, but should be fixed to also set a DBusError struct. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
