chiark / gitweb /
Connect to plymouth and support cancellation of in progress fsck
authorDidier Roche <didrocks@ubuntu.com>
Thu, 5 Feb 2015 16:08:18 +0000 (17:08 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 18 Feb 2015 15:33:46 +0000 (16:33 +0100)
commit07f9a21b6d2a8a7cfd8928a329b1ce9c479e3972
tree5b94114a936b1fcdbbc5d7f58e3aec9c959d1256
parent19e887e709c31ee4366ec44a770d3963cd48cb86
Connect to plymouth and support cancellation of in progress fsck

Try to connect and send to plymouth (if running) some checked report progress,
using direct plymouth protocole.

Update message is the following:
fsckd:<num_devices>:<progress>:<string>
* num_devices corresponds to the current number of devices being checked (int)
* progress corresponds to the current minimum percentage of all devices being
  checked (float, from 0 to 100)
* string is a translated message ready to be displayed by the plymouth theme
  displaying the information above. It can be overriden by plymouth themes
  supporting i18n.

Grab in fsckd plymouth watch key Control+C, and propagate this cancel request
to systemd-fsck which will terminate fsck.

Send a message to signal to user what key we are grabbing for fsck cancel.

Message is: fsckd-cancel-msg:<string>
Where string is a translated string ready to be displayed by the plymouth theme
indicating that Control+C can be used to cancel current checks. It can be
overriden (matching only fsckd-cancel-msg prefix) for themes supporting i18n.
src/fsck/fsck.c
src/fsckd/fsckd.c
src/fsckd/fsckd.h