NAME
libnvmf_tid_parse_strict - Like libnvmf_tid_parse(), but reject malformed input.
SYNOPSIS
int libnvmf_tid_parse_strict (struct libnvme_global_ctx *ctx , const char *str , struct libnvmf_tid **out );
ARGUMENTS
- ctx
-
Global context for logging.
- str
-
Input string.
- out
-
The allocated TID on success; NULL on error.
DESCRIPTION
Same as libnvmf_tid_parse except that a malformed token -- a non-empty bare token (no '='), an empty value, or an unrecognized key -- fails the whole parse instead of being skipped. Empty tokens (from ";;" or a trailing ';') are still benign. Useful when an unrecognized key should be treated as an error (e.g. a typo in a hand-edited config) rather than silently ignored.
RETURN
0 on success (*out is the allocated TID); -EINVAL if ctx, out or str is NULL, or on a malformed token; -ENOMEM on allocation failure.