[systemd-devel] [PATCH] core: Remove explicit Plymouth integration

Didier Roche didier.roche at canonical.com
Mon Mar 16 10:15:50 PDT 2015


Le 16/03/2015 17:53, Tom Gundersen a écrit :
> Thanks! Enthusiastically applied.
>
> Tom
>
> PS
>
> There is still some plymouth integration left in case anyone wants to
> work on getting rid of that.
Hey Tom, Jasper,

Note that systemd-fsckd (in the new set of patch posted last week on 
that ML to address Lennart's concerns) is using the plymouth_running() 
check to prevent some warning when the socket isn't there. I can copy 
the function back there, but maybe you can put that the 
plymouth_running() in util.c?

Cheers,
Didier

>
> On Mon, Mar 16, 2015 at 5:34 PM, Jasper St. Pierre
> <jstpierre at mecheye.net> wrote:
>> Even if plymouth is running, it might have not displayed the splash yet,
>> so we'll see a few lines on fbcon when we should have otherwise had
>> nothing.
>>
>> Plymouth integration was added to systemd in commit
>> 6faa11140bf776cdaeb8d22d01816e6e48296971. That same day, Plymouth got
>> systemd integration [0]. As such, the Plymouth integration has always
>> been obsolete, and was probably only for older Plymouth's. But I can't
>> imagine anybody running a Plymouth from 2011 with a systemd from 2015.
>>
>> Remove the Plymouth/systemd integration, and let Plymouth's code tell
>> systemd to print the details.
>>
>> [0] http://cgit.freedesktop.org/plymouth/commit/?id=537c16422cd49f1beeaab1ad39846a00018faec1
>>
>> Signed-off-by: Jasper St. Pierre <jstpierre at mecheye.net>
>> Cc: Daniel Drake <dsd at endlessm.com>
>> Cc: Ray Strode <rstrode at redhat.com>
>> ---
>>   src/core/main.c    | 2 +-
>>   src/core/manager.c | 4 +---
>>   src/shared/util.c  | 4 ----
>>   src/shared/util.h  | 2 --
>>   4 files changed, 2 insertions(+), 10 deletions(-)
>>
>> diff --git a/src/core/main.c b/src/core/main.c
>> index 2d393de..dd8b650 100644
>> --- a/src/core/main.c
>> +++ b/src/core/main.c
>> @@ -1561,7 +1561,7 @@ int main(int argc, char *argv[]) {
>>           }
>>
>>           if (arg_running_as == SYSTEMD_SYSTEM && !skip_setup) {
>> -                if (arg_show_status > 0 || plymouth_running())
>> +                if (arg_show_status > 0)
>>                           status_welcome();
>>
>>                   hostname_setup();
>> diff --git a/src/core/manager.c b/src/core/manager.c
>> index d33112d..1afd359 100644
>> --- a/src/core/manager.c
>> +++ b/src/core/manager.c
>> @@ -3009,9 +3009,7 @@ static bool manager_get_show_status(Manager *m, StatusType type) {
>>           if (m->show_status > 0)
>>                   return true;
>>
>> -        /* If Plymouth is running make sure we show the status, so
>> -         * that there's something nice to see when people press Esc */
>> -        return plymouth_running();
>> +        return false;
>>   }
>>
>>   void manager_set_first_boot(Manager *m, bool b) {
>> diff --git a/src/shared/util.c b/src/shared/util.c
>> index 5cbbe8f..3f3ca90 100644
>> --- a/src/shared/util.c
>> +++ b/src/shared/util.c
>> @@ -4228,10 +4228,6 @@ bool nulstr_contains(const char*nulstr, const char *needle) {
>>           return false;
>>   }
>>
>> -bool plymouth_running(void) {
>> -        return access("/run/plymouth/pid", F_OK) >= 0;
>> -}
>> -
>>   char* strshorten(char *s, size_t l) {
>>           assert(s);
>>
>> diff --git a/src/shared/util.h b/src/shared/util.h
>> index d229e1e..749bd0e 100644
>> --- a/src/shared/util.h
>> +++ b/src/shared/util.h
>> @@ -549,8 +549,6 @@ int kill_and_sigcont(pid_t pid, int sig);
>>
>>   bool nulstr_contains(const char*nulstr, const char *needle);
>>
>> -bool plymouth_running(void);
>> -
>>   bool hostname_is_valid(const char *s) _pure_;
>>   char* hostname_cleanup(char *s, bool lowercase);
>>
>> --
>> 2.1.0
>>
>> _______________________________________________
>> systemd-devel mailing list
>> systemd-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



More information about the systemd-devel mailing list