mirror of
https://github.com/systemd/systemd.git
synced 2025-03-09 12:58:26 +03:00
Fix missing space in comments (#5439)
This commit is contained in:
parent
ecc0eab247
commit
13e785f7a0
@ -28,7 +28,7 @@
|
||||
typedef struct khash khash;
|
||||
|
||||
/* For plain hash functions. Hash functions commonly supported on today's kernels are: crc32c, crct10dif, crc32,
|
||||
* sha224, sha256, sha512, sha384, sha1, md5, md4, sha3-224, sha3-256, sha3-384, sha3-512, and more.*/
|
||||
* sha224, sha256, sha512, sha384, sha1, md5, md4, sha3-224, sha3-256, sha3-384, sha3-512, and more. */
|
||||
int khash_new(khash **ret, const char *algorithm);
|
||||
|
||||
/* For keyed hash functions. Hash functions commonly supported on today's kernels are: hmac(sha256), cmac(aes),
|
||||
|
@ -154,7 +154,7 @@ int proc_cmdline_get_key(const char *key, unsigned flags, char **value) {
|
||||
*
|
||||
* c) The "value" parameter is NULL. In this case a search for the exact "key" parameter is performed.
|
||||
*
|
||||
* In all three cases, > 0 is returned if the key is found, 0 if not.*/
|
||||
* In all three cases, > 0 is returned if the key is found, 0 if not. */
|
||||
|
||||
if (isempty(key))
|
||||
return -EINVAL;
|
||||
|
@ -311,7 +311,7 @@ int rename_process(const char name[]) {
|
||||
|
||||
/* Third step, completely replace the argv[] array the kernel maintains for us. This requires privileges, but
|
||||
* has the advantage that the argv[] array is exactly what we want it to be, and not filled up with zeros at
|
||||
* the end. This is the best option for changing /proc/self/cmdline.*/
|
||||
* the end. This is the best option for changing /proc/self/cmdline. */
|
||||
if (mm_size < l+1) {
|
||||
size_t nn_size;
|
||||
char *nn;
|
||||
|
@ -1787,7 +1787,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
|
||||
|
||||
config_title_generate(&config);
|
||||
|
||||
/* select entry by configured pattern or EFI LoaderDefaultEntry= variable*/
|
||||
/* select entry by configured pattern or EFI LoaderDefaultEntry= variable */
|
||||
config_default_entry_select(&config);
|
||||
|
||||
/* if no configured entry to select from was found, enable the menu */
|
||||
|
@ -799,7 +799,7 @@ static int make_read_only(MountEntry *m, char **blacklist) {
|
||||
|
||||
if (mount_entry_read_only(m))
|
||||
r = bind_remount_recursive(mount_entry_path(m), true, blacklist);
|
||||
else if (m->mode == PRIVATE_DEV) { /* Superblock can be readonly but the submounts can't*/
|
||||
else if (m->mode == PRIVATE_DEV) { /* Superblock can be readonly but the submounts can't */
|
||||
if (mount(NULL, mount_entry_path(m), NULL, MS_REMOUNT|DEV_MOUNT_OPTIONS|MS_RDONLY, NULL) < 0)
|
||||
r = -errno;
|
||||
} else
|
||||
|
@ -1260,7 +1260,7 @@ static int usbffs_address_create(const char *path) {
|
||||
if (fstat(fd, &st) < 0)
|
||||
return -errno;
|
||||
|
||||
/* Check whether this is a regular file (ffs endpoint)*/
|
||||
/* Check whether this is a regular file (ffs endpoint) */
|
||||
if (!S_ISREG(st.st_mode))
|
||||
return -EEXIST;
|
||||
|
||||
|
@ -3895,7 +3895,7 @@ int unit_kill_context(
|
||||
* should not exist in non-delegated units. On
|
||||
* the unified hierarchy that's different,
|
||||
* there we get proper events. Hence rely on
|
||||
* them.*/
|
||||
* them. */
|
||||
|
||||
if (cg_unified(SYSTEMD_CGROUP_CONTROLLER) ||
|
||||
(detect_container() == 0 && !unit_cgroup_delegate(u)))
|
||||
|
@ -400,7 +400,7 @@ int curl_header_strdup(const void *contents, size_t sz, const char *field, char
|
||||
sz--;
|
||||
}
|
||||
|
||||
/* Truncate trailing whitespace*/
|
||||
/* Truncate trailing whitespace */
|
||||
while (sz > 0 && strchr(WHITESPACE, p[sz-1]))
|
||||
sz--;
|
||||
|
||||
|
@ -3283,7 +3283,7 @@ int journal_file_rotate(JournalFile **f, bool compress, bool seal, Set *deferred
|
||||
return -EINVAL;
|
||||
|
||||
/* Is this a journal file that was passed to us as fd? If so, we synthesized a path name for it, and we refuse
|
||||
* rotation, since we don't know the actual path, and couldn't rename the file hence.*/
|
||||
* rotation, since we don't know the actual path, and couldn't rename the file hence. */
|
||||
if (path_startswith(old_file->path, "/proc/self/fd"))
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -109,7 +109,7 @@ static void test_decompress_startswith(int compression,
|
||||
size_t csize, usize = 0, len;
|
||||
int r;
|
||||
|
||||
log_info("/* testing decompress_startswith with %s on %.20s text*/",
|
||||
log_info("/* testing decompress_startswith with %s on %.20s text */",
|
||||
object_compressed_to_string(compression), data);
|
||||
|
||||
#define BUFSIZE_1 512
|
||||
|
@ -58,7 +58,7 @@ int arp_network_bind_raw_socket(int ifindex, be32_t address, const struct ether_
|
||||
BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */
|
||||
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 1), /* A == 0 ? */
|
||||
BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */
|
||||
/* Sender Protocol Address or Target Protocol Address must be equal to the one we care about*/
|
||||
/* Sender Protocol Address or Target Protocol Address must be equal to the one we care about */
|
||||
BPF_STMT(BPF_LD + BPF_IMM, htobe32(address)), /* A <- clients IP */
|
||||
BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */
|
||||
BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_spa)), /* A <- SPA */
|
||||
|
@ -98,14 +98,14 @@ static void test_receive_basic_packet(sd_event *e) {
|
||||
|
||||
static const uint8_t frame[] = {
|
||||
/* Ethernet header */
|
||||
0x01, 0x80, 0xc2, 0x00, 0x00, 0x03, /* Destination MAC*/
|
||||
0x01, 0x80, 0xc2, 0x00, 0x00, 0x03, /* Destination MAC */
|
||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, /* Source MAC */
|
||||
0x88, 0xcc, /* Ethertype */
|
||||
/* LLDP mandatory TLVs */
|
||||
0x02, 0x07, 0x04, 0x00, 0x01, 0x02, /* Chassis: MAC, 00:01:02:03:04:05 */
|
||||
0x03, 0x04, 0x05,
|
||||
0x04, 0x04, 0x05, 0x31, 0x2f, 0x33, /* Port: interface name, "1/3" */
|
||||
0x06, 0x02, 0x00, 0x78, /* TTL: 120 seconds*/
|
||||
0x06, 0x02, 0x00, 0x78, /* TTL: 120 seconds */
|
||||
/* LLDP optional TLVs */
|
||||
0x08, 0x04, 0x50, 0x6f, 0x72, 0x74, /* Port Description: "Port" */
|
||||
0x0a, 0x03, 0x53, 0x59, 0x53, /* System Name: "SYS" */
|
||||
@ -162,7 +162,7 @@ static void test_receive_incomplete_packet(sd_event *e) {
|
||||
sd_lldp_neighbor **neighbors;
|
||||
uint8_t frame[] = {
|
||||
/* Ethernet header */
|
||||
0x01, 0x80, 0xc2, 0x00, 0x00, 0x03, /* Destination MAC*/
|
||||
0x01, 0x80, 0xc2, 0x00, 0x00, 0x03, /* Destination MAC */
|
||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, /* Source MAC */
|
||||
0x88, 0xcc, /* Ethertype */
|
||||
/* LLDP mandatory TLVs */
|
||||
@ -189,14 +189,14 @@ static void test_receive_oui_packet(sd_event *e) {
|
||||
sd_lldp_neighbor **neighbors;
|
||||
uint8_t frame[] = {
|
||||
/* Ethernet header */
|
||||
0x01, 0x80, 0xc2, 0x00, 0x00, 0x03, /* Destination MAC*/
|
||||
0x01, 0x80, 0xc2, 0x00, 0x00, 0x03, /* Destination MAC */
|
||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, /* Source MAC */
|
||||
0x88, 0xcc, /* Ethertype */
|
||||
/* LLDP mandatory TLVs */
|
||||
0x02, 0x07, 0x04, 0x00, 0x01, 0x02, /* Chassis: MAC, 00:01:02:03:04:05 */
|
||||
0x03, 0x04, 0x05,
|
||||
0x04, 0x04, 0x05, 0x31, 0x2f, 0x33, /* Port TLV: interface name, "1/3" */
|
||||
0x06, 0x02, 0x00, 0x78, /* TTL: 120 seconds*/
|
||||
0x06, 0x02, 0x00, 0x78, /* TTL: 120 seconds */
|
||||
/* LLDP optional TLVs */
|
||||
0xfe, 0x06, 0x00, 0x80, 0xc2, 0x01, /* Port VLAN ID: 0x1234 */
|
||||
0x12, 0x34,
|
||||
|
@ -34,7 +34,7 @@ struct sd_device {
|
||||
uint64_t properties_generation; /* changes whenever the properties are changed */
|
||||
uint64_t properties_iterator_generation; /* generation when iteration was started */
|
||||
|
||||
/* the subset of the properties that should be written to the db*/
|
||||
/* the subset of the properties that should be written to the db */
|
||||
OrderedHashmap *properties_db;
|
||||
|
||||
Hashmap *sysattr_values; /* cached sysattr values */
|
||||
|
@ -245,7 +245,7 @@ static int network_link_get_ifindexes(int ifindex, const char *key, int **ret) {
|
||||
}
|
||||
|
||||
if (ifis)
|
||||
ifis[c] = 0; /* Let's add a 0 ifindex to the end, to be nice*/
|
||||
ifis[c] = 0; /* Let's add a 0 ifindex to the end, to be nice */
|
||||
|
||||
*ret = ifis;
|
||||
ifis = NULL;
|
||||
|
@ -545,10 +545,10 @@ int mount_all(const char *dest,
|
||||
static const MountPoint mount_table[] = {
|
||||
/* inner child mounts */
|
||||
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL|MOUNT_IN_USERNS },
|
||||
{ "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ...*/
|
||||
{ "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ... */
|
||||
{ "/proc/sys/net", "/proc/sys/net", NULL, NULL, MS_BIND, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO|MOUNT_APPLY_APIVFS_NETNS }, /* (except for this) */
|
||||
{ NULL, "/proc/sys", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* ... then, make it r/o */
|
||||
{ "/proc/sysrq-trigger", "/proc/sysrq-trigger", NULL, NULL, MS_BIND, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ...*/
|
||||
{ "/proc/sysrq-trigger", "/proc/sysrq-trigger", NULL, NULL, MS_BIND, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ... */
|
||||
{ NULL, "/proc/sysrq-trigger", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* ... then, make it r/o */
|
||||
|
||||
/* outer child mounts */
|
||||
|
@ -2539,7 +2539,7 @@ static int outer_child(
|
||||
* inside the containter that create a new mount namespace.
|
||||
* See https://github.com/systemd/systemd/issues/3860
|
||||
* Further submounts (such as /dev) done after this will inherit the
|
||||
* shared propagation mode.*/
|
||||
* shared propagation mode. */
|
||||
r = mount_verbose(LOG_ERR, NULL, directory, NULL, MS_SHARED|MS_REC, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
@ -148,7 +148,7 @@ int dns_answer_add(DnsAnswer *a, DnsResourceRecord *rr, int ifindex, DnsAnswerFl
|
||||
* match. We don't really care if they match
|
||||
* precisely, but we do care whether one is 0
|
||||
* and the other is not. See RFC 2181, Section
|
||||
* 5.2.*/
|
||||
* 5.2. */
|
||||
|
||||
if ((rr->ttl == 0) != (a->items[i].rr->ttl == 0))
|
||||
return -EINVAL;
|
||||
|
@ -433,7 +433,7 @@ static int dns_cache_put_positive(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Entry exists already? Update TTL, timestamp and owner*/
|
||||
/* Entry exists already? Update TTL, timestamp and owner */
|
||||
existing = dns_cache_get(c, rr);
|
||||
if (existing) {
|
||||
dns_cache_item_update_positive(
|
||||
|
@ -2458,7 +2458,7 @@ static int dns_transaction_requires_nsec(DnsTransaction *t) {
|
||||
if (r > 0) {
|
||||
/* The lookup is from a TLD that is proven not to
|
||||
* exist, and we are in downgrade mode, hence ignore
|
||||
* that fact that we didn't get any NSEC RRs.*/
|
||||
* that fact that we didn't get any NSEC RRs. */
|
||||
|
||||
log_info("Detected a negative query %s in a private DNS zone, permitting unsigned response.",
|
||||
dns_resource_key_to_string(t->key, key_str, sizeof key_str));
|
||||
@ -2763,7 +2763,7 @@ static int dnssec_validate_records(
|
||||
const char *source;
|
||||
|
||||
/* This RRset validated, but as a wildcard. This means we need
|
||||
* to prove via NSEC/NSEC3 that no matching non-wildcard RR exists.*/
|
||||
* to prove via NSEC/NSEC3 that no matching non-wildcard RR exists. */
|
||||
|
||||
/* First step, determine the source of synthesis */
|
||||
r = dns_resource_record_source(rrsig, &source);
|
||||
@ -2798,7 +2798,7 @@ static int dnssec_validate_records(
|
||||
return r;
|
||||
if (r == 0) {
|
||||
/* Data does not require signing. In that case, just copy it over,
|
||||
* but remember that this is by no means authenticated.*/
|
||||
* but remember that this is by no means authenticated. */
|
||||
r = dns_answer_move_by_key(validated, &t->answer, rr->key, 0);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
@ -543,7 +543,7 @@ bool link_relevant(Link *l, int family, bool local_multicast) {
|
||||
* beat, can do multicast and has at least one link-local (or better) IP address.
|
||||
*
|
||||
* A link is relevant for non-multicast traffic if it isn't a loopback device, has a link beat, and has at
|
||||
* least one routable address.*/
|
||||
* least one routable address. */
|
||||
|
||||
if (l->flags & (IFF_LOOPBACK|IFF_DORMANT))
|
||||
return false;
|
||||
|
@ -213,7 +213,7 @@ static char *unquote(const char *s, const char* quotes) {
|
||||
* trailing quotes if there is one. Doesn't care about
|
||||
* escaping or anything.
|
||||
*
|
||||
* DON'T USE THIS FOR NEW CODE ANYMORE!*/
|
||||
* DON'T USE THIS FOR NEW CODE ANYMORE! */
|
||||
|
||||
l = strlen(s);
|
||||
if (l < 2)
|
||||
|
@ -636,7 +636,7 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
|
||||
case IMAGE_SUBVOLUME:
|
||||
case IMAGE_DIRECTORY:
|
||||
/* If we can we'll always try to create a new btrfs subvolume here, even if the source is a plain
|
||||
* directory.*/
|
||||
* directory. */
|
||||
|
||||
new_path = strjoina("/var/lib/machines/", new_name);
|
||||
|
||||
@ -712,7 +712,7 @@ int image_read_only(Image *i, bool b) {
|
||||
use the "immutable" flag, to at least make the
|
||||
top-level directory read-only. It's not as good as
|
||||
a read-only subvolume, but at least something, and
|
||||
we can read the value back.*/
|
||||
we can read the value back. */
|
||||
|
||||
r = chattr_path(i->path, b ? FS_IMMUTABLE_FL : 0, FS_IMMUTABLE_FL);
|
||||
if (r < 0)
|
||||
|
@ -373,16 +373,16 @@ static void test_dns_name_is_valid(void) {
|
||||
test_dns_name_is_valid_one("ä", 1);
|
||||
test_dns_name_is_valid_one("\n", 0);
|
||||
|
||||
/* 256 characters*/
|
||||
/* 256 characters */
|
||||
test_dns_name_is_valid_one("a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345", 0);
|
||||
|
||||
/* 255 characters*/
|
||||
/* 255 characters */
|
||||
test_dns_name_is_valid_one("a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a1234", 0);
|
||||
|
||||
/* 254 characters*/
|
||||
/* 254 characters */
|
||||
test_dns_name_is_valid_one("a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a123", 0);
|
||||
|
||||
/* 253 characters*/
|
||||
/* 253 characters */
|
||||
test_dns_name_is_valid_one("a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12345678.a12", 1);
|
||||
|
||||
/* label of 64 chars length */
|
||||
|
@ -872,7 +872,7 @@ static int parse_attribute_from_arg(Item *item) {
|
||||
{ 's', FS_SECRM_FL }, /* Secure deletion */
|
||||
{ 'u', FS_UNRM_FL }, /* Undelete */
|
||||
{ 't', FS_NOTAIL_FL }, /* file tail should not be merged */
|
||||
{ 'T', FS_TOPDIR_FL }, /* Top of directory hierarchies*/
|
||||
{ 'T', FS_TOPDIR_FL }, /* Top of directory hierarchies */
|
||||
{ 'C', FS_NOCOW_FL }, /* Do not cow file */
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user