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) functions

See 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.

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:
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#

int xnvme_dev_pr(const struct xnvme_dev *dev, int opts)#

Prints the given xnvme_dev to stdout.

Parameters:
  • dev – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_geo_fpr#

int xnvme_geo_fpr(FILE *stream, const struct xnvme_geo *geo, int opts)#

Prints the given xnvme_geo to the given output stream.

Parameters:
  • stream – output stream used for printing

  • geo – pointer to the the xnvme_geo to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_geo_pr#

int xnvme_geo_pr(const struct xnvme_geo *geo, int opts)#

Prints the given xnvme_geo to stdout.

Parameters:
  • geo – pointer to the the xnvme_geo to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

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#

int xnvme_lba_fpr(FILE *stream, uint64_t lba, enum xnvme_pr opts)#

Prints the given LBA to the given output stream.

Parameters:
  • stream – output stream used for printing

  • lba – the LBA to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

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#

int xnvme_lba_pr(uint64_t lba, enum xnvme_pr opts)#

Prints the given Logical Block Addresses (LBA) to stdout.

Parameters:
  • lba – the LBA to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

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:
Returns:

On success, the number of characters printed is returned.