From 6b44ad0bf8e6e9ddfbc6e998e67c2937140ff809 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 12 Nov 2020 16:58:00 +0900 Subject: [PATCH] man: set constant tag to NUL or NULL --- man/journald.conf.xml | 2 +- man/pam_systemd.xml | 2 +- man/sd-id128.xml | 7 ++++--- man/sd_bus_creds_get_pid.xml | 6 +++--- man/sd_bus_error.xml | 14 +++++++------- man/sd_bus_interface_name_is_valid.xml | 2 +- man/sd_bus_path_encode.xml | 4 ++-- man/sd_bus_process.xml | 2 +- man/sd_bus_track_new.xml | 10 +++++----- man/sd_event_source_get_event.xml | 2 +- man/sd_event_source_set_prepare.xml | 2 +- man/sd_event_source_set_userdata.xml | 2 +- man/sd_get_seats.xml | 2 +- man/sd_id128_to_string.xml | 5 +++-- man/sd_journal_has_runtime_files.xml | 2 +- man/sd_listen_fds.xml | 6 +++--- man/sd_uid_get_state.xml | 7 ++++--- man/sd_watchdog_enabled.xml | 2 +- man/systemd-ask-password.xml | 2 +- man/systemd.exec.xml | 2 +- man/systemd.journal-fields.xml | 2 +- man/systemd.netdev.xml | 3 ++- man/systemd.network.xml | 2 +- man/systemd.unit.xml | 8 ++++---- 24 files changed, 51 insertions(+), 47 deletions(-) diff --git a/man/journald.conf.xml b/man/journald.conf.xml index e50e8cd5c7..959815a8f1 100644 --- a/man/journald.conf.xml +++ b/man/journald.conf.xml @@ -433,7 +433,7 @@ The maximum line length to permit when converting stream logs into record logs. When a systemd unit's standard output/error are connected to the journal via a stream socket, the data read is split into - individual log records at newline (\n, ASCII 10) and NUL characters. If no such delimiter is + individual log records at newline (\n, ASCII 10) and NUL characters. If no such delimiter is read for the specified number of bytes a hard log record boundary is artificially inserted, breaking up overly long lines into multiple log records. Selecting overly large values increases the possible memory usage of the Journal daemon for each stream client, as in the worst case the journal daemon needs to buffer the specified diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml index c26209f111..21a2581b24 100644 --- a/man/pam_systemd.xml +++ b/man/pam_systemd.xml @@ -244,7 +244,7 @@ Session limits PAM modules earlier in the stack, that is those that come before pam_systemd.so, - can set session scope limits using the PAM context objects. The data for these objects is provided as NUL-terminated C strings + can set session scope limits using the PAM context objects. The data for these objects is provided as NUL-terminated C strings and maps directly to the respective unit resource control directives. Note that these limits apply to individual sessions of the user, they do not apply to all user processes as a combined whole. In particular, the per-user user@.service unit instance, which runs the systemd --user manager process and its children, and is tracked outside of any session, being shared diff --git a/man/sd-id128.xml b/man/sd-id128.xml index 79154306a9..40a3cc59ae 100644 --- a/man/sd-id128.xml +++ b/man/sd-id128.xml @@ -85,8 +85,8 @@ #define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1) - SD_ID128_NULL may be used to refer to the 128bit ID consisting of only NUL - bytes. + SD_ID128_NULL may be used to refer to the 128bit ID consisting of only + NUL bytes. SD_ID128_MAKE_STR() is similar to SD_ID128_MAKE(), but creates a const char* expression that can be conveniently used in message formats and such: @@ -136,7 +136,8 @@ int main(int argc, char **argv) { return 0; } - Use sd_id128_is_null() to check if an 128bit ID consists of only NUL bytes: + Use sd_id128_is_null() to check if an 128bit ID consists of only + NUL bytes: int main(int argc, char *argv[]) { assert(sd_id128_is_null(SD_ID128_NULL)); diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml index e52bee9776..8f5b94e531 100644 --- a/man/sd_bus_creds_get_pid.xml +++ b/man/sd_bus_creds_get_pid.xml @@ -439,14 +439,14 @@ All functions that take a const char** parameter will store the answer there as an - address of a NUL-terminated string. It will be valid as long as + address of a NUL-terminated string. It will be valid as long as c remains valid, and should not be freed or modified by the caller. All functions that take a char*** parameter will store the answer there as an address of an array - of strings. Each individual string is NUL-terminated, and the - array is NULL-terminated as a whole. It will be valid as long as + of strings. Each individual string is NUL-terminated, and the + array is NULL-terminated as a whole. It will be valid as long as c remains valid, and should not be freed or modified by the caller. diff --git a/man/sd_bus_error.xml b/man/sd_bus_error.xml index 324d455d59..af2238e74d 100644 --- a/man/sd_bus_error.xml +++ b/man/sd_bus_error.xml @@ -160,10 +160,10 @@ but additional domain-specific errors may be defined by applications. The message field usually contains a human-readable string describing the details, but might - be NULL. An unset sd_bus_error structure - should have both fields initialized to NULL. Set an error + be NULL. An unset sd_bus_error structure + should have both fields initialized to NULL. Set an error structure to SD_BUS_ERROR_NULL in order to - reset both fields to NULL. When no longer necessary, resources + reset both fields to NULL. When no longer necessary, resources held by the sd_bus_error structure should be destroyed with sd_bus_error_free(). @@ -181,14 +181,14 @@ for a list of well-known error names. Additional error mappings may be defined with sd_bus_error_add_map3. If - e is NULL, no error structure is initialized, + e is NULL, no error structure is initialized, but the error is still converted into an errno-style error. If name is NULL, it is assumed that no error occurred, and 0 is returned. This means that this function may be conveniently used in a return statement. If - message is NULL, no message is set. This + message is NULL, no message is set. This call can fail if no memory may be allocated for the name and message strings, in which case an SD_BUS_ERROR_NO_MEMORY error might be set @@ -291,10 +291,10 @@ will not be deallocated, and must be free3d by the caller if necessary. The function may also be called safely - on unset errors (error structures with both fields set to NULL), + on unset errors (error structures with both fields set to NULL), in which case it performs no operation. This call will reset the error structure after freeing the data, so that all fields are set - to NULL. The structure may be reused afterwards. + to NULL. The structure may be reused afterwards. diff --git a/man/sd_bus_interface_name_is_valid.xml b/man/sd_bus_interface_name_is_valid.xml index 4b1614e352..81a3fad0e2 100644 --- a/man/sd_bus_interface_name_is_valid.xml +++ b/man/sd_bus_interface_name_is_valid.xml @@ -65,7 +65,7 @@ Return Value Those functions return 1 if the argument is a valid interface / service / member name or object - path, and 0 if it is not. If the argument is NULL, an error is returned. + path, and 0 if it is not. If the argument is NULL, an error is returned. Errors diff --git a/man/sd_bus_path_encode.xml b/man/sd_bus_path_encode.xml index 15aa8a1b86..5cdb1d77a1 100644 --- a/man/sd_bus_path_encode.xml +++ b/man/sd_bus_path_encode.xml @@ -118,7 +118,7 @@ will be stored there. Each % character will only match the current label. It will never match across labels. Furthermore, only a single directive is allowed per label. - If NULL is passed as output storage, the + If NULL is passed as output storage, the label is verified but not returned to the caller. @@ -130,7 +130,7 @@ argument. On success, sd_bus_path_decode() returns a positive value if the prefixed matched, or 0 if it did not. If the prefix matched, the external identifier is returned - in the return parameter. If it did not match, NULL is returned in + in the return parameter. If it did not match, NULL is returned in the return parameter. On failure, a negative errno-style error number is returned by either function. The returned strings must be diff --git a/man/sd_bus_process.xml b/man/sd_bus_process.xml index 225bced1cd..c5a9e0cfde 100644 --- a/man/sd_bus_process.xml +++ b/man/sd_bus_process.xml @@ -56,7 +56,7 @@ ret is not NULL and the call processed a message, *ret is set to this message. The caller owns a reference to this message and should call sd_bus_message_unref3 when the - message is no longer needed. If ret is not NULL, progress was made, but no message was + message is no longer needed. If ret is not NULL, progress was made, but no message was processed, *ret is set to NULL. If a the bus object is connected to an diff --git a/man/sd_bus_track_new.xml b/man/sd_bus_track_new.xml index 84812b00e5..2147ad16dd 100644 --- a/man/sd_bus_track_new.xml +++ b/man/sd_bus_track_new.xml @@ -101,11 +101,11 @@ sd_bus_track_add_sender(). They may be dropped again via sd_bus_track_remove_name() and sd_bus_track_remove_sender(). Alternatively, references on peers are removed automatically - when they disconnect from the bus. If non-NULL the handler may specify a function that is - invoked whenever the last reference is dropped, regardless whether the reference is dropped explicitly via - sd_bus_track_remove_name() or implicitly because the peer disconnected from the bus. The final - argument userdata may be used to attach a generic user data pointer to the object. This - pointer is passed to the handler callback when it is invoked. + when they disconnect from the bus. If non-NULL the handler may specify + a function that is invoked whenever the last reference is dropped, regardless whether the reference is dropped + explicitly via sd_bus_track_remove_name() or implicitly because the peer disconnected from the + bus. The final argument userdata may be used to attach a generic user data pointer to the + object. This pointer is passed to the handler callback when it is invoked. sd_bus_track_ref() creates a new reference to a bus peer tracking object. This object will not be destroyed until sd_bus_track_unref() has been called as many times plus once diff --git a/man/sd_event_source_get_event.xml b/man/sd_event_source_get_event.xml index b301d6f9b9..a850583100 100644 --- a/man/sd_event_source_get_event.xml +++ b/man/sd_event_source_get_event.xml @@ -51,7 +51,7 @@ On success, sd_event_source_get_event() returns the associated event loop object. On failure, it returns - NULL. + NULL. diff --git a/man/sd_event_source_set_prepare.xml b/man/sd_event_source_set_prepare.xml index f24b00edd5..d52c55b3db 100644 --- a/man/sd_event_source_set_prepare.xml +++ b/man/sd_event_source_set_prepare.xml @@ -52,7 +52,7 @@ when the event source was created. The event source will be disabled if the callback function returns a negative error code. The callback function may be used to reconfigure the precise events to wait for. - If the callback parameter is passed as NULL + If the callback parameter is passed as NULL the callback function is reset. Event source objects have no preparation callback associated diff --git a/man/sd_event_source_set_userdata.xml b/man/sd_event_source_set_userdata.xml index f3649c4e71..e8e5dc1444 100644 --- a/man/sd_event_source_set_userdata.xml +++ b/man/sd_event_source_set_userdata.xml @@ -70,7 +70,7 @@ sd_event_source_set_userdata() and sd_event_source_get_userdata() return the previously set user data pointer. On failure, they return - NULL. + NULL. diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml index 3596dbc0de..818f9684c3 100644 --- a/man/sd_get_seats.xml +++ b/man/sd_get_seats.xml @@ -56,7 +56,7 @@ sd_get_seats() may be used to determine all currently available local seats. Returns the number of seat - identifiers and if the input pointer is non-NULL, a + identifiers and if the input pointer is non-NULL, a NULL-terminated array of seat identifiers is stored at the address. The returned array and all strings it references need to be freed diff --git a/man/sd_id128_to_string.xml b/man/sd_id128_to_string.xml index 3e5b53a429..54cab1af5a 100644 --- a/man/sd_id128_to_string.xml +++ b/man/sd_id128_to_string.xml @@ -50,8 +50,9 @@ sd_id128_from_string() implements the reverse operation: it takes a 33 character string with 32 hexadecimal digits (either lowercase or uppercase, terminated by NUL) and parses them back into a 128-bit ID returned in ret. Alternatively, this call can also parse a - 37-character string with a 128-bit ID formatted as RFC UUID. If ret is passed as NULL the - function will validate the passed ID string, but not actually return it in parsed form. + 37-character string with a 128-bit ID formatted as RFC UUID. If ret is passed as + NULL the function will validate the passed ID string, but not actually return it in parsed + form. For more information about the sd_id128_t type see diff --git a/man/sd_journal_has_runtime_files.xml b/man/sd_journal_has_runtime_files.xml index a1e0529423..e452b49e82 100644 --- a/man/sd_journal_has_runtime_files.xml +++ b/man/sd_journal_has_runtime_files.xml @@ -57,7 +57,7 @@ Return value Both sd_journal_has_runtime_files() and sd_journal_has_persistent_files() return -EINVAL - if their argument is NULL. + if their argument is NULL. diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml index 6013579050..9ddd129aae 100644 --- a/man/sd_listen_fds.xml +++ b/man/sd_listen_fds.xml @@ -94,7 +94,7 @@ sd_listen_fds(), but optionally also returns an array of strings with identification names for the passed file descriptors, if that is available and the - names parameter is non-NULL. This + names parameter is non-NULL. This information is read from the $LISTEN_FDNAMES variable, which may contain a colon-separated list of names. For socket-activated services, these names may be configured with the @@ -113,11 +113,11 @@ sd_is_socket() and related calls is not sufficient. Note that the names used are not unique in any way. The returned array of strings has as many entries as file - descriptors have been received, plus a final NULL pointer + descriptors have been received, plus a final NULL pointer terminating the array. The caller needs to free the array itself and each of its elements with libc's free() call after use. If the names parameter is - NULL, the call is entirely equivalent to + NULL, the call is entirely equivalent to sd_listen_fds(). Under specific conditions, the following automatic file diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml index dcac27b326..2d6fb0c8a3 100644 --- a/man/sd_uid_get_state.xml +++ b/man/sd_uid_get_state.xml @@ -161,9 +161,10 @@ -EINVAL - An input parameter was invalid (out of range, or NULL, where that is not - accepted). This is also returned if the passed user ID is 0xFFFF or - 0xFFFFFFFF, which are undefined on Linux. + An input parameter was invalid (out of range, or NULL, + where that is not accepted). This is also returned if the passed user ID is + 0xFFFF or 0xFFFFFFFF, which are undefined on Linux. + diff --git a/man/sd_watchdog_enabled.xml b/man/sd_watchdog_enabled.xml index 26bd57bbb2..1abc2f8051 100644 --- a/man/sd_watchdog_enabled.xml +++ b/man/sd_watchdog_enabled.xml @@ -63,7 +63,7 @@ sd_watchdog_enabled() will also return with zero. - If the usec parameter is non-NULL, + If the usec parameter is non-NULL, sd_watchdog_enabled() will write the timeout in µs for the watchdog logic to it. diff --git a/man/systemd-ask-password.xml b/man/systemd-ask-password.xml index 95e6fd6873..433260475d 100644 --- a/man/systemd-ask-password.xml +++ b/man/systemd-ask-password.xml @@ -131,7 +131,7 @@ cached key will have a timeout of 2.5min set, after which it will be purged from the kernel keyring. Note that it is possible to cache multiple passwords under the same keyname, - in which case they will be stored as NUL-separated list of + in which case they will be stored as NUL-separated list of passwords. Use keyctl1 to access the cached key via the kernel keyring diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 518ae99386..4b85f914f4 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -2757,7 +2757,7 @@ StandardInputData=SWNrIHNpdHplIGRhIHVuJyBlc3NlIEtsb3BzLAp1ZmYgZWVtYWwga2xvcHAncy user IDs, public key material and similar non-sensitive data. For everything else use LoadCredential=. In order to embed binary data into the credential data use C-style escaping (i.e. \n to embed a newline, or \x00 to embed - a NUL byte). + a NUL byte). If a credential of the same ID is listed in both LoadCredential= and SetCredential=, the latter will act as default if the former cannot be diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml index f1883200a7..578e074f57 100644 --- a/man/systemd.journal-fields.xml +++ b/man/systemd.journal-fields.xml @@ -365,7 +365,7 @@ Only applies to _TRANSPORT=stdout records: indicates that the log message in the standard output/error stream was not terminated with a normal newline character (\n, i.e. ASCII 10). Specifically, when set this field is one of - (in case the line was terminated by a NUL byte), (in + (in case the line was terminated by a NUL byte), (in case the maximum log line length was reached, as configured with LineMax= in journald.conf5), (if this was the last log record of a stream and the stream ended without a diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml index 9e3cd7fdff..e6a96e3a15 100644 --- a/man/systemd.netdev.xml +++ b/man/systemd.netdev.xml @@ -1770,7 +1770,8 @@ AdActorSystem= - Specifies the 802.3ad system mac address. This can not be either NULL or Multicast. + Specifies the 802.3ad system mac address. This can not be either + NULL or Multicast. diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 42bf0c8e30..9edf009c08 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -1944,7 +1944,7 @@ IPv6Token=prefixstable:2002:da8:1:: C-style escapes. This setting can be specified multiple times. If an empty string is specified, then all options specified earlier are cleared. Takes a whitespace-separated list of strings. Note that - currently NUL bytes are not allowed. + currently NUL bytes are not allowed. diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index aa545d0a19..52db36be71 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -266,10 +266,10 @@ String Escaping for Inclusion in Unit Names Sometimes it is useful to convert arbitrary strings into unit names. To facilitate this, a method of string - escaping is used, in order to map strings containing arbitrary byte values (except NUL) into valid unit names and - their restricted character set. A common special case are unit names that reflect paths to objects in the file - system hierarchy. Example: a device unit dev-sda.device refers to a device with the device - node /dev/sda in the file system. + escaping is used, in order to map strings containing arbitrary byte values (except NUL) into + valid unit names and their restricted character set. A common special case are unit names that reflect paths to + objects in the file system hierarchy. Example: a device unit dev-sda.device refers to a device + with the device node /dev/sda in the file system. The escaping algorithm operates as follows: given a string, any / character is replaced by -, and all other characters which are not ASCII alphanumerics or _ are