1
0
mirror of https://github.com/systemd/systemd synced 2026-04-22 23:15:20 +02:00

Compare commits

..

No commits in common. "ee3d33c415d426ec3459435bcb6c45390f343044" and "da637c8fcad1baa530578982d41a6ecb1440f7c5" have entirely different histories.

6 changed files with 14 additions and 15 deletions

View File

@ -26,7 +26,7 @@ jobs:
ci: ci:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
concurrency: concurrency:
group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }} group: ${{ github.workflow }}-${{ matrix.distro }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
strategy: strategy:
fail-fast: false fail-fast: false

View File

@ -2180,8 +2180,8 @@ static void reset_scheduled_shutdown(Manager *m) {
m->scheduled_shutdown_type = NULL; m->scheduled_shutdown_type = NULL;
m->scheduled_shutdown_timeout = USEC_INFINITY; m->scheduled_shutdown_timeout = USEC_INFINITY;
m->scheduled_shutdown_uid = UID_INVALID; m->scheduled_shutdown_uid = UID_INVALID;
m->scheduled_shutdown_tty = mfree(m->scheduled_shutdown_tty); freep(&m->scheduled_shutdown_tty);
m->wall_message = mfree(m->wall_message); freep(&m->wall_message);
m->shutdown_dry_run = false; m->shutdown_dry_run = false;
if (m->unlink_nologin) { if (m->unlink_nologin) {

View File

@ -417,9 +417,9 @@ static void dmi_memory_device_size_detail(
dmi_print_memory_size("MEMORY_DEVICE", attr_suffix, slot_num, code, MEMORY_SIZE_UNIT_BYTES); dmi_print_memory_size("MEMORY_DEVICE", attr_suffix, slot_num, code, MEMORY_SIZE_UNIT_BYTES);
} }
static void dmi_decode(const struct dmi_header *h, static void dmi_decode(const struct dmi_header *h) {
unsigned *next_slot_num) {
const uint8_t *data = h->data; const uint8_t *data = h->data;
static unsigned next_slot_num = 0;
unsigned slot_num; unsigned slot_num;
/* /*
@ -441,14 +441,15 @@ static void dmi_decode(const struct dmi_header *h,
dmi_print_memory_size("MEMORY_ARRAY", "MAX_CAPACITY", -1, DWORD(data + 0x07), MEMORY_SIZE_UNIT_KB); dmi_print_memory_size("MEMORY_ARRAY", "MAX_CAPACITY", -1, DWORD(data + 0x07), MEMORY_SIZE_UNIT_KB);
else if (h->length >= 0x17) else if (h->length >= 0x17)
dmi_print_memory_size("MEMORY_ARRAY", "MAX_CAPACITY", -1, QWORD(data + 0x0F), MEMORY_SIZE_UNIT_BYTES); dmi_print_memory_size("MEMORY_ARRAY", "MAX_CAPACITY", -1, QWORD(data + 0x0F), MEMORY_SIZE_UNIT_BYTES);
printf("MEMORY_ARRAY_NUM_DEVICES=%u\n", WORD(data + 0x0D));
break; break;
case 17: /* 7.18 Memory Device */ case 17: /* 7.18 Memory Device */
slot_num = *next_slot_num; slot_num = next_slot_num;
*next_slot_num = slot_num + 1; next_slot_num++;
log_debug("Memory Device: %u", slot_num); log_debug("Memory Device");
if (h->length < 0x15) if (h->length < 0x15)
break; break;
@ -524,7 +525,6 @@ static void dmi_decode(const struct dmi_header *h,
static void dmi_table_decode(const uint8_t *buf, size_t len, uint16_t num) { static void dmi_table_decode(const uint8_t *buf, size_t len, uint16_t num) {
const uint8_t *data = buf; const uint8_t *data = buf;
unsigned next_slot_num = 0;
/* 4 is the length of an SMBIOS structure header */ /* 4 is the length of an SMBIOS structure header */
for (uint16_t i = 0; (i < num || num == 0) && data + 4 <= buf + len; i++) { for (uint16_t i = 0; (i < num || num == 0) && data + 4 <= buf + len; i++) {
@ -559,12 +559,10 @@ static void dmi_table_decode(const uint8_t *buf, size_t len, uint16_t num) {
break; break;
if (display) if (display)
dmi_decode(&h, &next_slot_num); dmi_decode(&h);
data = next; data = next;
} }
if (next_slot_num > 0)
printf("MEMORY_ARRAY_NUM_DEVICES=%u\n", next_slot_num);
} }
static int dmi_table(int64_t base, uint32_t len, uint16_t num, const char *devmem, bool no_file_offset) { static int dmi_table(int64_t base, uint32_t len, uint16_t num, const char *devmem, bool no_file_offset) {

View File

@ -1,9 +1,11 @@
MEMORY_ARRAY_LOCATION=System Board Or Motherboard MEMORY_ARRAY_LOCATION=System Board Or Motherboard
MEMORY_ARRAY_EC_TYPE=Multi-bit ECC MEMORY_ARRAY_EC_TYPE=Multi-bit ECC
MEMORY_ARRAY_MAX_CAPACITY=12884901888 MEMORY_ARRAY_MAX_CAPACITY=12884901888
MEMORY_ARRAY_NUM_DEVICES=3
MEMORY_ARRAY_LOCATION=System Board Or Motherboard MEMORY_ARRAY_LOCATION=System Board Or Motherboard
MEMORY_ARRAY_EC_TYPE=Multi-bit ECC MEMORY_ARRAY_EC_TYPE=Multi-bit ECC
MEMORY_ARRAY_MAX_CAPACITY=12884901888 MEMORY_ARRAY_MAX_CAPACITY=12884901888
MEMORY_ARRAY_NUM_DEVICES=3
MEMORY_DEVICE_0_TOTAL_WIDTH=72 MEMORY_DEVICE_0_TOTAL_WIDTH=72
MEMORY_DEVICE_0_DATA_WIDTH=64 MEMORY_DEVICE_0_DATA_WIDTH=64
MEMORY_DEVICE_0_SIZE=8589934592 MEMORY_DEVICE_0_SIZE=8589934592
@ -90,4 +92,3 @@ MEMORY_DEVICE_6_MANUFACTURER=Not Specified
MEMORY_DEVICE_6_SERIAL_NUMBER=Not Specified MEMORY_DEVICE_6_SERIAL_NUMBER=Not Specified
MEMORY_DEVICE_6_ASSET_TAG=Not Specified MEMORY_DEVICE_6_ASSET_TAG=Not Specified
MEMORY_DEVICE_6_PART_NUMBER=Not Specified MEMORY_DEVICE_6_PART_NUMBER=Not Specified
MEMORY_ARRAY_NUM_DEVICES=7

View File

@ -1,5 +1,6 @@
MEMORY_ARRAY_LOCATION=System Board Or Motherboard MEMORY_ARRAY_LOCATION=System Board Or Motherboard
MEMORY_ARRAY_MAX_CAPACITY=34359738368 MEMORY_ARRAY_MAX_CAPACITY=34359738368
MEMORY_ARRAY_NUM_DEVICES=2
MEMORY_DEVICE_0_TOTAL_WIDTH=64 MEMORY_DEVICE_0_TOTAL_WIDTH=64
MEMORY_DEVICE_0_DATA_WIDTH=64 MEMORY_DEVICE_0_DATA_WIDTH=64
MEMORY_DEVICE_0_SIZE=4294967296 MEMORY_DEVICE_0_SIZE=4294967296
@ -30,4 +31,3 @@ MEMORY_DEVICE_1_ASSET_TAG=None
MEMORY_DEVICE_1_RANK=1 MEMORY_DEVICE_1_RANK=1
MEMORY_DEVICE_1_CONFIGURED_SPEED_MTS=2400 MEMORY_DEVICE_1_CONFIGURED_SPEED_MTS=2400
MEMORY_DEVICE_1_CONFIGURED_VOLTAGE=1 MEMORY_DEVICE_1_CONFIGURED_VOLTAGE=1
MEMORY_ARRAY_NUM_DEVICES=2

View File

@ -1,5 +1,6 @@
MEMORY_ARRAY_LOCATION=System Board Or Motherboard MEMORY_ARRAY_LOCATION=System Board Or Motherboard
MEMORY_ARRAY_MAX_CAPACITY=68719476736 MEMORY_ARRAY_MAX_CAPACITY=68719476736
MEMORY_ARRAY_NUM_DEVICES=4
MEMORY_DEVICE_0_TOTAL_WIDTH=64 MEMORY_DEVICE_0_TOTAL_WIDTH=64
MEMORY_DEVICE_0_DATA_WIDTH=64 MEMORY_DEVICE_0_DATA_WIDTH=64
MEMORY_DEVICE_0_SIZE=8589934592 MEMORY_DEVICE_0_SIZE=8589934592
@ -64,4 +65,3 @@ MEMORY_DEVICE_3_CONFIGURED_SPEED_MTS=2400
MEMORY_DEVICE_3_MINIMUM_VOLTAGE=1 MEMORY_DEVICE_3_MINIMUM_VOLTAGE=1
MEMORY_DEVICE_3_MAXIMUM_VOLTAGE=1 MEMORY_DEVICE_3_MAXIMUM_VOLTAGE=1
MEMORY_DEVICE_3_CONFIGURED_VOLTAGE=1 MEMORY_DEVICE_3_CONFIGURED_VOLTAGE=1
MEMORY_ARRAY_NUM_DEVICES=4