Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-09 Thread Lennart Poettering
On Thu, 09.10.14 07:21, Jan Synacek (jsyna...@redhat.com) wrote: A related thing: there's a mapping bus-error - errno implemented, but it only works for the errors defined in the library itself. It would be nice to extend this mapping to the user defined errors, e.g. in core/.

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Lennart Poettering
On Tue, 07.10.14 13:35, Jan Synacek (jsyna...@redhat.com) wrote: --- src/shared/install.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/shared/install.c b/src/shared/install.c index fa064c2..945bb27 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Oct 08, 2014 at 11:54:19AM +0200, Lennart Poettering wrote: On Tue, 07.10.14 13:35, Jan Synacek (jsyna...@redhat.com) wrote: --- src/shared/install.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/shared/install.c b/src/shared/install.c index

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Lennart Poettering
On Wed, 08.10.14 15:29, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: On Wed, Oct 08, 2014 at 11:54:19AM +0200, Lennart Poettering wrote: On Tue, 07.10.14 13:35, Jan Synacek (jsyna...@redhat.com) wrote: --- src/shared/install.c | 13 + 1 file changed, 13

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Oct 08, 2014 at 05:02:31PM +0200, Lennart Poettering wrote: On Wed, 08.10.14 15:29, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: On Wed, Oct 08, 2014 at 11:54:19AM +0200, Lennart Poettering wrote: On Tue, 07.10.14 13:35, Jan Synacek (jsyna...@redhat.com) wrote:

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Lennart Poettering
On Wed, 08.10.14 17:24, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: I think that the best way to handle this would be to use a temporary structure like { char *unit_name; char *error_message; int code} and use this to pass the information about the error from the lower

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Oct 08, 2014 at 09:28:39PM +0200, Lennart Poettering wrote: On Wed, 08.10.14 17:24, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: I think that the best way to handle this would be to use a temporary structure like { char *unit_name; char *error_message; int code}

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Lennart Poettering
On Wed, 08.10.14 23:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: A related thing: there's a mapping bus-error - errno implemented, but it only works for the errors defined in the library itself. It would be nice to extend this mapping to the user defined errors,

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Oct 08, 2014 at 11:23:51PM +0200, Lennart Poettering wrote: On Wed, 08.10.14 23:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: A related thing: there's a mapping bus-error - errno implemented, but it only works for the errors defined in the library itself. It

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-08 Thread Jan Synacek
Lennart Poettering lenn...@poettering.net writes: On Wed, 08.10.14 17:24, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: I think that the best way to handle this would be to use a temporary structure like { char *unit_name; char *error_message; int code} and use this to

[systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-07 Thread Jan Synacek
--- src/shared/install.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/shared/install.c b/src/shared/install.c index fa064c2..945bb27 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1516,6 +1516,19 @@ int unit_file_enable( return r;

Re: [systemd-devel] [PATCH] core: don't allow enabling if unit is masked

2014-10-07 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Oct 07, 2014 at 01:35:41PM +0200, Jan Synacek wrote: --- src/shared/install.c | 13 + 1 file changed, 13 insertions(+) Applied. Making the error messages better is another step that needs to be done. Zbyszek ___ systemd-devel