diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-04-15 03:59:26 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-04-15 03:59:26 +0000 |
commit | 142ffb8bdcde64942077c0f9d15936a66aad9725 (patch) | |
tree | 33cdcba9e4cedf3a547fac9ee9a8951e9fc369f2 /sys/dev/cxgbe/if_cc.c | |
parent | ddde90ac812b51bd7d73c208fe72415c9b85b263 (diff) | |
download | src-142ffb8bdcde64942077c0f9d15936a66aad9725.tar.gz src-142ffb8bdcde64942077c0f9d15936a66aad9725.zip |
kern uuid: break format validation out into a separate KPI
This new KPI, validate_uuid, strictly validates the formatting of the input
UUID and, optionally, populates a given struct uuid.
As noted in the header, the key differences are that the new KPI won't
recognize an empty string as a nil UUID and it won't do any kind of semantic
validation on it. Also key is that populating a struct uuid is optional, so
the caller doesn't necessarily need to allocate a bogus one on the stack
just to validate the string.
This KPI has specifically been broken out in support of D24288, which will
preload /etc/hostid in loader so that early boot hostuuid users (e.g.
anything that calls ether_gen_addr) can have a valid hostuuid to work with
once it's been stashed in /etc/hostid.
Notes
Notes:
svn path=/head/; revision=359953
Diffstat (limited to 'sys/dev/cxgbe/if_cc.c')
0 files changed, 0 insertions, 0 deletions