Comment 6 for bug 1911187

Revision history for this message
Dan Streetman (ddstreet) wrote :

@joalif, one thing I noticed, that isn't important for this SRU, is that the !ENABLE_LOGIND case still has a log message indicating shutdown will happen immediately, i.e.:

int logind_schedule_shutdown(void) {

#if ENABLE_LOGIND
...stuff...
#else
        return log_error_errno(SYNTHETIC_ERRNO(ENOSYS),
                               "Cannot schedule shutdown without logind support, proceeding with immediate shutdown.");
#endif
}

however, since the caller has been changed to return error instead of immediate reboot, maybe that message should be changed as well. I'd actually suggest that both messages in this function, that state what will happen next but rely on the caller to actually do what the log states, are in the wrong place, and the *calling* function should log an appropriate message about what it's doing next instead of this function.

Doesn't matter for this though since we do define ENABLE_LOGIND for our builds, just a suggestion if you want to send a patch to debian :)