mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
logind: rename "log_message" to "log_verb"
This field is used to log SHUTDOWN=. Calling it "something-message" is confusing.
This commit is contained in:
parent
0cb09bcb82
commit
153d1579ef
@ -29,7 +29,7 @@ static const HandleActionData handle_action_data_table[_HANDLE_ACTION_MAX] = {
|
|||||||
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
||||||
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
||||||
.message = "System is powering down",
|
.message = "System is powering down",
|
||||||
.log_message = "power-off",
|
.log_verb = "power-off",
|
||||||
},
|
},
|
||||||
[HANDLE_REBOOT] = {
|
[HANDLE_REBOOT] = {
|
||||||
.handle = HANDLE_REBOOT,
|
.handle = HANDLE_REBOOT,
|
||||||
@ -41,7 +41,7 @@ static const HandleActionData handle_action_data_table[_HANDLE_ACTION_MAX] = {
|
|||||||
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
||||||
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
||||||
.message = "System is rebooting",
|
.message = "System is rebooting",
|
||||||
.log_message = "reboot",
|
.log_verb = "reboot",
|
||||||
},
|
},
|
||||||
[HANDLE_HALT] = {
|
[HANDLE_HALT] = {
|
||||||
.handle = HANDLE_HALT,
|
.handle = HANDLE_HALT,
|
||||||
@ -53,7 +53,7 @@ static const HandleActionData handle_action_data_table[_HANDLE_ACTION_MAX] = {
|
|||||||
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
||||||
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
||||||
.message = "System is halting",
|
.message = "System is halting",
|
||||||
.log_message = "halt",
|
.log_verb = "halt",
|
||||||
},
|
},
|
||||||
[HANDLE_KEXEC] = {
|
[HANDLE_KEXEC] = {
|
||||||
.handle = HANDLE_KEXEC,
|
.handle = HANDLE_KEXEC,
|
||||||
@ -65,7 +65,7 @@ static const HandleActionData handle_action_data_table[_HANDLE_ACTION_MAX] = {
|
|||||||
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
.sleep_operation = _SLEEP_OPERATION_INVALID,
|
||||||
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
.message_id = SD_MESSAGE_SHUTDOWN_STR,
|
||||||
.message = "System is rebooting with kexec",
|
.message = "System is rebooting with kexec",
|
||||||
.log_message = "kexec",
|
.log_verb = "kexec",
|
||||||
},
|
},
|
||||||
[HANDLE_SUSPEND] = {
|
[HANDLE_SUSPEND] = {
|
||||||
.handle = HANDLE_SUSPEND,
|
.handle = HANDLE_SUSPEND,
|
||||||
|
@ -39,7 +39,7 @@ struct HandleActionData {
|
|||||||
SleepOperation sleep_operation;
|
SleepOperation sleep_operation;
|
||||||
const char* message_id;
|
const char* message_id;
|
||||||
const char* message;
|
const char* message;
|
||||||
const char* log_message;
|
const char* log_verb;
|
||||||
};
|
};
|
||||||
|
|
||||||
int manager_handle_action(
|
int manager_handle_action(
|
||||||
|
@ -1519,7 +1519,7 @@ static int bus_manager_log_shutdown(
|
|||||||
assert(a);
|
assert(a);
|
||||||
|
|
||||||
const char *message = a->message ?: "System is shutting down";
|
const char *message = a->message ?: "System is shutting down";
|
||||||
const char *log_message = a->log_message ? strjoina("SHUTDOWN=", a->log_message) : NULL;
|
const char *log_verb = a->log_verb ? strjoina("SHUTDOWN=", a->log_verb) : NULL;
|
||||||
|
|
||||||
return log_struct(LOG_NOTICE,
|
return log_struct(LOG_NOTICE,
|
||||||
"MESSAGE_ID=%s", a->message_id ?: SD_MESSAGE_SHUTDOWN_STR,
|
"MESSAGE_ID=%s", a->message_id ?: SD_MESSAGE_SHUTDOWN_STR,
|
||||||
@ -1528,7 +1528,7 @@ static int bus_manager_log_shutdown(
|
|||||||
m->wall_message ? " (" : "",
|
m->wall_message ? " (" : "",
|
||||||
strempty(m->wall_message),
|
strempty(m->wall_message),
|
||||||
m->wall_message ? ")" : ""),
|
m->wall_message ? ")" : ""),
|
||||||
log_message);
|
log_verb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lid_switch_ignore_handler(sd_event_source *e, uint64_t usec, void *userdata) {
|
static int lid_switch_ignore_handler(sd_event_source *e, uint64_t usec, void *userdata) {
|
||||||
|
Loading…
Reference in New Issue
Block a user