[systemd-devel] Antw: Re: Can I enable/disable a target?

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue May 14 09:02:48 UTC 2019


>>> Lennart Poettering <lennart at poettering.net> schrieb am 14.05.2019 um 10:55
in
Nachricht <20190514085558.GD21579 at gardel-login>:
> On Di, 14.05.19 08:01, Ulrich Windl (Ulrich.Windl at rz.uni-regensburg.de) 
> wrote:
> 
>> > systemd matches these UNIX semantics closely: we output error messages
>> > exactly the same way as everything else on UNIX: a brief string
>> > explaining what was attempted, followed by a colon, followed by a
>> > space, followed by the system error string.
>> >
>> > I mean, sure we can always tweak error messages more, but we generally
>> > start from how C and UNIX suggest these works, and then improve from
>> > there.
>>
>> Thanks for the explanation. Actually I'm programming in C for about 30
years
>> now. The point I had tried to address was: I think it doesn't make sense to

> use
>> the low-level error code (or message) in a high level routine. Just
imagine
>> some find(1) command would output "No such file or directory" when no file
>> matched the search criteria given. IMHO ERRNO-related messages
>> should be used
> 
> I don't have to image that. It's exactly what find outputs:
> 
>     $ find /i/dont/exist
>     find: ‘/i/dont/exist’: No such file or directory

I was talking about this:
v04:~> find /var -name no-such-file 2>&1 | grep -v ': Permission denied'

it outputs nothing if no file was found. And it's similar to systemd: It looks
for a file in different places, but eventually did not find it. Also: In your
example above the "No such file or directory" is specific to /i/dont/exist,
while in systemd it's unspecific (which is confusing IMHO when no file name is
associated dire4ctly with it).

Regards,
Ulrich



More information about the systemd-devel mailing list