[systemd-devel] [PATCH 1/5] fsckd: Don't use strjoina on gettext() call

Didier Roche didrocks at ubuntu.com
Tue Mar 10 03:32:28 PDT 2015


Le 09/03/2015 19:11, Lennart Poettering a écrit :
>
> So I fixed a number of issues, but there are some bits I am not really
> keen to fix, mostly because it's hard for me to test as I don't use a
> file system that still requires fsck...
>
> - /dev/console needs to be opened only on demand but not continously,
>    to keep the SAK window as small as possible.
>

> - A clear regime needs to be enforced: either functions log errors on
>    their own, or they don't. In the latter case the calling function
>    needs to log errors instead. Currently some of the functions (like
>    send_message_plymouth_socket()) log some errors but don't log
>    others. And sometimes if they currently do log the functions
>    invoking them log each error a second time! (As is the case for
>    send_message_plymouth() which calls send_message_plymouth_socket()).
>
> - We should avoid mixing stack allocation calls and function
>    calls. See man page of alloca() about this. Hence: invoking
>    strjoina() around gettext calls is *not* OK.
>
> And there's probably more to fix...
>
> Anyway, please look into fixing this, I am kinda relying on patches
> for this, as I don't use this myself. Fedora isn't set up for it, nor
> do I use a file system that still requires fsck at boot...
>

Those 3 points should be fixed or at least enhanced with the set of 
patches I'm attaching now. Please look in particular on the 02 one as I 
changed back some errors values introduced by your recent commits (I'm 
unsure if that was just an oversight). I tried to rationalize the log 
erroring to be more coherent (and especially avoiding double erroring), 
hope this is what you wanted.

I didn't touch to the communication (and so, global flow) from 
systemd-fsck to systemd-fsckd point yet as changing it raises quite some 
issues as discussed in the other part of the thread (how to ensure the 
unit instance is in error if fsck fails or is cancel? How to even send 
the cancel message request itself if we don't have any communication back?)

Feel free to point any mistake.


Didier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fsckd-Don-t-use-strjoina-on-gettext-call.patch
Type: text/x-diff
Size: 1353 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150310/78e1dbd8/attachment.patch>


More information about the systemd-devel mailing list