libxnvme_pp.h#
Enums#
xnvme_pr#
-
enum xnvme_pr#
SPDX-FileCopyrightText: Samsung Electronics Co., Ltd.
SPDX-License-Identifier: BSD-3-Clause Options for pretty-printer (
*_pr
,*_fpr
) functionsSee also
libxnvme_pp.h
Values:
-
enumerator XNVME_PR_DEF#
XNVME_PR_DEF: Default options.
-
enumerator XNVME_PR_YAML#
XNVME_PR_YAML: Print formatted as YAML.
-
enumerator XNVME_PR_TERSE#
XNVME_PR_TERSE: Print without formatting.
-
enumerator XNVME_PR_DEF#
Functions#
xnvme_be_attr_fpr#
-
int xnvme_be_attr_fpr(FILE *stream, const struct xnvme_be_attr *attr, int opts)#
Prints the given backend attribute to the given output stream.
- Parameters:
stream – output stream used for printing
attr – Pointer to the xnvme_be_attr to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_be_attr_list_fpr#
-
int xnvme_be_attr_list_fpr(FILE *stream, const struct xnvme_be_attr_list *list, int opts)#
Prints the given backend attribute list to the given output stream.
- Parameters:
stream – output stream used for printing
list – Pointer to the backend attribute list to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_be_attr_list_pr#
-
int xnvme_be_attr_list_pr(const struct xnvme_be_attr_list *list, int opts)#
Prints the given backend attribute list to standard out.
- Parameters:
list – Pointer to the backend attribute list to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_be_attr_pr#
-
int xnvme_be_attr_pr(const struct xnvme_be_attr *attr, int opts)#
Prints the given backend attribute to stdout.
- Parameters:
attr – Pointer to the xnvme_be_attr to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_cmd_ctx_pr#
-
void xnvme_cmd_ctx_pr(const struct xnvme_cmd_ctx *ctx, int UNUSED_opts)#
Prints a humanly readable representation the given xnvme_cmd_ctx.
- Parameters:
ctx – Pointer to the xnvme_cmd_ctx to print
UNUSED_opts – Printer options
xnvme_dev_fpr#
-
int xnvme_dev_fpr(FILE *stream, const struct xnvme_dev *dev, int opts)#
Prints the given xnvme_dev to the given output stream.
- Parameters:
stream – output stream used for printing
dev – pointer to structure to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_dev_pr#
xnvme_geo_fpr#
xnvme_geo_pr#
xnvme_ident_fpr#
-
int xnvme_ident_fpr(FILE *stream, const struct xnvme_ident *ident, int opts)#
Prints the given xnvme_ident to the given output stream.
- Parameters:
stream – output stream used for printing
ident – pointer to structure to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_ident_pr#
-
int xnvme_ident_pr(const struct xnvme_ident *ident, int opts)#
Prints the given xnvme_ident to stdout.
- Parameters:
ident – pointer to structure to print
opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.
xnvme_ident_yaml#
-
int xnvme_ident_yaml(FILE *stream, const struct xnvme_ident *ident, int indent, const char *sep, int head)#
Writes a YAML-representation of the given ‘ident’ to stream.
xnvme_lba_fpr#
xnvme_lba_fprn#
-
int xnvme_lba_fprn(FILE *stream, const uint64_t *lba, uint16_t nlb, enum xnvme_pr opts)#
Prints the given list of Logical Block Addresses (LBAs)to the given output stream.
- Parameters:
stream – output stream used for printing
lba – Pointer to an array of LBAs to print
nlb – Number of LBAs to print from the given list
opts – printer options, see xnvme_pr
xnvme_lba_pr#
xnvme_lba_prn#
-
int xnvme_lba_prn(const uint64_t *lba, uint16_t nlb, enum xnvme_pr opts)#
Print a list of Logical Block Addresses (LBAs)
- Parameters:
lba – Pointer to an array of LBAs to print
nlb – Length of the array in items
opts – Printer options
- Returns:
On success, the number of characters printed is returned.
xnvme_opts_pr#
-
int xnvme_opts_pr(const struct xnvme_opts *opts, int pr_opts)#
Prints a humanly readable representation of the given xnvme_opts.
- Parameters:
opts – Pointer to the xnvme_opts to print
pr_opts – printer options, see xnvme_pr
- Returns:
On success, the number of characters printed is returned.