From: Zbigniew Jędrzejewski-Szmek Date: Mon, 19 Apr 2021 13:33:09 +0000 (+0200) Subject: man: mention sd_id128_is_allf(), SD_ID128_ALLF X-Git-Tag: v249-rc1~368^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78aa5b6f59f1787bcd509f8070f82ae72add0fd9;p=thirdparty%2Fsystemd.git man: mention sd_id128_is_allf(), SD_ID128_ALLF It was added in 670814387ba8973245c08123e7240669f51a55a8, but not mentioned in the man pages. --- diff --git a/man/rules/meson.build b/man/rules/meson.build index 7ef26cb2c62..c21f1b6b4c1 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -119,7 +119,8 @@ manpages = [ ['sd-hwdb', '3', [], ''], ['sd-id128', '3', - ['SD_ID128_CONST_STR', + ['SD_ID128_ALLF', + 'SD_ID128_CONST_STR', 'SD_ID128_FORMAT_STR', 'SD_ID128_FORMAT_VAL', 'SD_ID128_MAKE', @@ -127,6 +128,7 @@ manpages = [ 'SD_ID128_NULL', 'SD_ID128_UUID_FORMAT_STR', 'sd_id128_equal', + 'sd_id128_is_allf', 'sd_id128_is_null', 'sd_id128_t'], ''], diff --git a/man/sd-id128.xml b/man/sd-id128.xml index 2005cd19db8..c448d60a940 100644 --- a/man/sd-id128.xml +++ b/man/sd-id128.xml @@ -18,16 +18,18 @@ sd-id128 - sd_id128_t + SD_ID128_ALLF + SD_ID128_CONST_STR + SD_ID128_FORMAT_STR + SD_ID128_FORMAT_VAL SD_ID128_MAKE SD_ID128_MAKE_STR SD_ID128_NULL - SD_ID128_CONST_STR - SD_ID128_FORMAT_STR SD_ID128_UUID_FORMAT_STR - SD_ID128_FORMAT_VAL sd_id128_equal + sd_id128_is_allf sd_id128_is_null + sd_id128_t APIs for processing 128-bit IDs @@ -85,7 +87,7 @@ #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 + SD_ID128_NULL may be used to refer to the 128-bit ID consisting of only NUL bytes. SD_ID128_MAKE_STR() is similar to SD_ID128_MAKE(), but creates a @@ -136,12 +138,15 @@ int main(int argc, char **argv) { return 0; } - Use sd_id128_is_null() to check if an 128bit ID consists of only + Use sd_id128_is_null() to check if an 128-bit ID consists of only NUL bytes: - int main(int argc, char *argv[]) { - assert(sd_id128_is_null(SD_ID128_NULL)); -} + assert(sd_id128_is_null(SD_ID128_NULL)); + + Similarly, use sd_id128_is_allf() to check if an 128-bit ID consists of only + 0xFF bytes (all bits on): + + assert(sd_id128_is_allf(SD_ID128_ALLF)); Note that new, randomized IDs may be generated with systemd-id1281's