mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 02:21:44 +03:00
Merge pull request #2936 from martinpitt/master
sd-dbus: Fix uint32 property reading
This commit is contained in:
commit
f1057581fc
@ -1068,7 +1068,7 @@ static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SD_BUS_TYPE_UINT32: {
|
case SD_BUS_TYPE_UINT32: {
|
||||||
uint64_t u;
|
uint32_t u;
|
||||||
uint32_t *p = userdata;
|
uint32_t *p = userdata;
|
||||||
|
|
||||||
r = sd_bus_message_read_basic(m, type, &u);
|
r = sd_bus_message_read_basic(m, type, &u);
|
||||||
|
@ -1896,13 +1896,13 @@ static void output_machines_list(struct machine_info *machine_infos, unsigned n)
|
|||||||
printf("%s%s%s ", on_state, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_state);
|
printf("%s%s%s ", on_state, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_state);
|
||||||
|
|
||||||
if (m->is_host)
|
if (m->is_host)
|
||||||
printf("%-*s (host) %s%-*s%s %s%*u%s %*u\n",
|
printf("%-*s (host) %s%-*s%s %s%*" PRIu32 "%s %*" PRIu32 "\n",
|
||||||
(int) (namelen - (sizeof(" (host)")-1)), strna(m->name),
|
(int) (namelen - (sizeof(" (host)")-1)), strna(m->name),
|
||||||
on_state, statelen, strna(m->state), off_state,
|
on_state, statelen, strna(m->state), off_state,
|
||||||
on_failed, failedlen, m->n_failed_units, off_failed,
|
on_failed, failedlen, m->n_failed_units, off_failed,
|
||||||
jobslen, m->n_jobs);
|
jobslen, m->n_jobs);
|
||||||
else
|
else
|
||||||
printf("%-*s %s%-*s%s %s%*u%s %*u\n",
|
printf("%-*s %s%-*s%s %s%*" PRIu32 "%s %*" PRIu32 "\n",
|
||||||
namelen, strna(m->name),
|
namelen, strna(m->name),
|
||||||
on_state, statelen, strna(m->state), off_state,
|
on_state, statelen, strna(m->state), off_state,
|
||||||
on_failed, failedlen, m->n_failed_units, off_failed,
|
on_failed, failedlen, m->n_failed_units, off_failed,
|
||||||
@ -4637,8 +4637,8 @@ static int show_system_status(sd_bus *bus) {
|
|||||||
printf(" State: %s%s%s\n",
|
printf(" State: %s%s%s\n",
|
||||||
on, strna(mi.state), off);
|
on, strna(mi.state), off);
|
||||||
|
|
||||||
printf(" Jobs: %u queued\n", mi.n_jobs);
|
printf(" Jobs: %" PRIu32 " queued\n", mi.n_jobs);
|
||||||
printf(" Failed: %u units\n", mi.n_failed_units);
|
printf(" Failed: %" PRIu32 " units\n", mi.n_failed_units);
|
||||||
|
|
||||||
printf(" Since: %s; %s\n",
|
printf(" Since: %s; %s\n",
|
||||||
format_timestamp(since2, sizeof(since2), mi.timestamp),
|
format_timestamp(since2, sizeof(since2), mi.timestamp),
|
||||||
|
Loading…
Reference in New Issue
Block a user