1
0
mirror of https://github.com/systemd/systemd synced 2025-10-04 11:14:45 +02:00

Compare commits

..

No commits in common. "827ef318ec27a2c3c753614e89218b2a7d205937" and "bd9ea0f691d3f258a92eff7c870ebb2e214ccdcd" have entirely different histories.

10 changed files with 29 additions and 88 deletions

View File

@ -210,10 +210,6 @@ bool dhcp6_option_can_request(uint16_t option) {
case SD_DHCP6_OPTION_V6_DOTS_ADDRESS:
case SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF:
case SD_DHCP6_OPTION_V6_DNR:
case SD_DHCP6_OPTION_REGISTERED_DOMAIN:
case SD_DHCP6_OPTION_FORWARD_DIST_MANAGER:
case SD_DHCP6_OPTION_REVERSE_DIST_MANAGER:
case SD_DHCP6_OPTION_ADDR_REG_ENABLE:
return true;
default:
return false;

View File

@ -98,8 +98,6 @@ typedef enum DHCP6MessageType {
DHCP6_MESSAGE_DISCONNECT = 33, /* RFC 8156 */
DHCP6_MESSAGE_STATE = 34, /* RFC 8156 */
DHCP6_MESSAGE_CONTACT = 35, /* RFC 8156 */
DHCP6_MESSAGE_ADDR_REG_INFORM = 36, /* RFC 9686 */
DHCP6_MESSAGE_ADDR_REG_REPLY = 37, /* RFC 9686 */
_DHCP6_MESSAGE_TYPE_MAX,
_DHCP6_MESSAGE_TYPE_INVALID = -EINVAL,
} DHCP6MessageType;

View File

@ -275,10 +275,6 @@ libsystemd_tests += [
'sources' : files('sd-journal/test-journal-append.c'),
'type' : 'manual',
},
{
'sources' : files('sd-journal/test-journal-dump.c'),
'type' : 'manual',
},
{
'sources' : files('sd-journal/test-journal-verify.c'),
'timeout' : 90,

View File

@ -46,11 +46,11 @@
#include "user-util.h"
#include "xattr-util.h"
#define DEFAULT_DATA_HASH_TABLE_SIZE 2047U
#define DEFAULT_FIELD_HASH_TABLE_SIZE 1023U
#define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
#define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
#define DEFAULT_COMPRESS_THRESHOLD 512U
#define MIN_COMPRESS_THRESHOLD 8U
#define DEFAULT_COMPRESS_THRESHOLD (512ULL)
#define MIN_COMPRESS_THRESHOLD (8ULL)
/* This is the minimum journal file size */
#define JOURNAL_FILE_SIZE_MIN (512 * U64_KB) /* 512 KiB */
@ -1286,14 +1286,15 @@ static int journal_file_setup_data_hash_table(JournalFile *f) {
beyond 75% fill level. Calculate the hash table size for
the maximum file size based on these metrics. */
s = MAX(f->metrics.max_size * 4 / 768 / 3,
DEFAULT_DATA_HASH_TABLE_SIZE);
s = (f->metrics.max_size * 4 / 768 / 3) * sizeof(HashItem);
if (s < DEFAULT_DATA_HASH_TABLE_SIZE)
s = DEFAULT_DATA_HASH_TABLE_SIZE;
log_debug("Reserving %"PRIu64" entries in data hash table.", s);
log_debug("Reserving %"PRIu64" entries in data hash table.", s / sizeof(HashItem));
r = journal_file_append_object(f,
OBJECT_DATA_HASH_TABLE,
offsetof(Object, hash_table.items) + s * sizeof(HashItem),
offsetof(Object, hash_table.items) + s,
&o, &p);
if (r < 0)
return r;
@ -1301,7 +1302,7 @@ static int journal_file_setup_data_hash_table(JournalFile *f) {
memzero(o->hash_table.items, s);
f->header->data_hash_table_offset = htole64(p + offsetof(Object, hash_table.items));
f->header->data_hash_table_size = htole64(s * sizeof(HashItem));
f->header->data_hash_table_size = htole64(s);
return 0;
}
@ -1318,19 +1319,19 @@ static int journal_file_setup_field_hash_table(JournalFile *f) {
* number should grow very slowly only */
s = DEFAULT_FIELD_HASH_TABLE_SIZE;
log_debug("Reserving %"PRIu64" entries in field hash table.", s);
log_debug("Reserving %"PRIu64" entries in field hash table.", s / sizeof(HashItem));
r = journal_file_append_object(f,
OBJECT_FIELD_HASH_TABLE,
offsetof(Object, hash_table.items) + s * sizeof(HashItem),
offsetof(Object, hash_table.items) + s,
&o, &p);
if (r < 0)
return r;
memzero(o->hash_table.items, s * sizeof(HashItem));
memzero(o->hash_table.items, s);
f->header->field_hash_table_offset = htole64(p + offsetof(Object, hash_table.items));
f->header->field_hash_table_size = htole64(s * sizeof(HashItem));
f->header->field_hash_table_size = htole64(s);
return 0;
}

View File

@ -1,46 +0,0 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "errno-util.h"
#include "journal-file.h"
#include "log.h"
#include "main-func.h"
#include "pager.h"
#include "strv.h"
static int run(int argc, char *argv[]) {
int r = 0;
unsigned n = 0;
_cleanup_(mmap_cache_unrefp) MMapCache *m = mmap_cache_new();
assert_se(m);
pager_open(/* flags= */ 0);
STRV_FOREACH(s, strv_skip(argv, 1)) {
JournalFile *f = NULL;
int k = journal_file_open(
/* fd= */ -EBADF,
*s,
O_RDONLY,
/* file_flags= */ 0,
0666,
/* compress_threshold_bytes= */ UINT64_MAX,
/* metrics= */ NULL,
m,
/* template= */ NULL,
&f);
if (k < 0)
RET_GATHER(r, log_error_errno(k, "Failed to open %s, continuing: %m", *s));
if (n++ > 0)
puts("");
journal_file_print_header(f);
journal_file_close(f);
}
return r;
}
DEFINE_MAIN_FUNCTION(run);

View File

@ -4,7 +4,7 @@
#include "list.h"
#include "resolved-forward.h"
#define DELEGATE_SEARCH_DOMAINS_MAX 1024
#define DELEGATE_SEARCH_DOMAINS_MAX 256
#define DELEGATE_DNS_SERVERS_MAX 256
/* A DnsDelegate object is used to manage additional, explicitly configured unicast DNS lookup scopes,

View File

@ -9,7 +9,7 @@
#include "resolve-util.h"
#include "resolved-forward.h"
#define LINK_SEARCH_DOMAINS_MAX 1024
#define LINK_SEARCH_DOMAINS_MAX 256
#define LINK_DNS_SERVERS_MAX 256
typedef struct LinkAddress {

View File

@ -15,7 +15,7 @@
#include "resolved-etc-hosts.h"
#include "resolved-forward.h"
#define MANAGER_SEARCH_DOMAINS_MAX 1024
#define MANAGER_SEARCH_DOMAINS_MAX 256
#define MANAGER_DNS_SERVERS_MAX 256
typedef struct Manager {

View File

@ -166,12 +166,8 @@ enum {
SD_DHCP6_OPTION_V6_DOTS_RI = 141, /* RFC 8973 */
SD_DHCP6_OPTION_V6_DOTS_ADDRESS = 142, /* RFC 8973 */
SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF = 143, /* RFC 6153 */
SD_DHCP6_OPTION_V6_DNR = 144, /* RFC 9463 */
SD_DHCP6_OPTION_REGISTERED_DOMAIN = 145, /* RFC 9527 */
SD_DHCP6_OPTION_FORWARD_DIST_MANAGER = 146, /* RFC 9527 */
SD_DHCP6_OPTION_REVERSE_DIST_MANAGER = 147, /* RFC 9527 */
SD_DHCP6_OPTION_ADDR_REG_ENABLE = 148 /* RFC 9686 */
/* option codes 149-65535 are unassigned */
SD_DHCP6_OPTION_V6_DNR = 144 /* RFC 9463 */
/* option codes 145-65535 are unassigned */
};
_SD_END_DECLARATIONS;

View File

@ -653,12 +653,12 @@ NotifyAccess=all
ExecStart=bash -x -c ' \
trap '"'"' \
now=\$\$(grep "^now" /proc/timer_list | cut -d" " -f3 | rev | cut -c 4- | rev); \
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}\\n" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
(ls /etc | grep marker) >/tmp/markers/50i; \
(cat /usr/lib/os-release) >>/tmp/markers/50i; \
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
'"'"' SIGHUP; \
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
while true; do sleep 1; done; \
'
EOF
@ -688,12 +688,12 @@ NotifyAccess=all
ExecStart=bash -x -c ' \
trap '"'"' \
now=\$\$(grep "^now" /proc/timer_list | cut -d" " -f3 | rev | cut -c 4- | rev); \
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}\\n" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
(ls /etc | grep marker) >/tmp/markers/50j; \
(cat /usr/lib/os-release) >>/tmp/markers/50j; \
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
'"'"' SIGHUP; \
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
while true; do sleep 1; done; \
'
EOF
@ -718,12 +718,12 @@ NotifyAccess=all
ExecStart=bash -x -c ' \
trap '"'"' \
now=\$\$(grep "^now" /proc/timer_list | cut -d" " -f3 | rev | cut -c 4- | rev); \
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}\\n" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
(ls /etc | grep marker) >/tmp/markers/50k; \
(cat /usr/lib/os-release) >>/tmp/markers/50k; \
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
'"'"' SIGHUP; \
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
while true; do sleep 1; done; \
'
EOF