libxnvme_be.h#
Structs#
xnvme_be_attr#
-
struct xnvme_be_attr#
SPDX-FileCopyrightText: Samsung Electronics Co., Ltd.
SPDX-License-Identifier: BSD-3-Clause Representation of xNVMe library backend attributes
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_get#
-
const struct xnvme_be_attr *xnvme_be_attr_get(int idx)#
Returns the backend attribute at the given index.
- Parameters:
idx – Index into the list of backend configurations
- Returns:
Pointer to the attribute, NULL when idx is past the end
xnvme_be_attr_list_fpr#
xnvme_be_attr_list_pr#
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.
Header#
/**
* SPDX-FileCopyrightText: Samsung Electronics Co., Ltd
*
* SPDX-License-Identifier: BSD-3-Clause
*
* @headerfile libxnvme_be.h
*/
/**
* Representation of xNVMe library backend attributes
*
* @struct xnvme_be_attr
*/
struct xnvme_be_attr {
const char *name; ///< Backend name
const char *descr; ///< Human-readable description
uint32_t caps; ///< Bitmask of xnvme_be_cap (0 = legacy/mixin-based)
uint8_t _rsvd[4];
};
/**
* Prints the given backend attribute to the given output stream
*
* @param stream output stream used for printing
* @param attr Pointer to the ::xnvme_be_attr to print
* @param opts printer options, see ::xnvme_pr
*
* @return On success, the number of characters printed is returned.
*/
int
xnvme_be_attr_fpr(FILE *stream, const struct xnvme_be_attr *attr, int opts);
/**
* Prints the given backend attribute to stdout
*
* @param attr Pointer to the ::xnvme_be_attr to print
* @param opts printer options, see ::xnvme_pr
*
* @return On success, the number of characters printed is returned.
*/
int
xnvme_be_attr_pr(const struct xnvme_be_attr *attr, int opts);
/**
* Prints attributes of backend configurations to the given output stream
*
* @param stream output stream used for printing
* @param opts printer options, see ::xnvme_pr
*
* @return On success, the number of characters printed is returned.
*/
int
xnvme_be_attr_list_fpr(FILE *stream, enum xnvme_pr opts);
/**
* Prints attributes of backend configurations to stdout
*
* @param opts printer options, see ::xnvme_pr
*
* @return On success, the number of characters printed is returned.
*/
int
xnvme_be_attr_list_pr(enum xnvme_pr opts);
/**
* Returns the backend attribute at the given index
*
* @param idx Index into the list of backend configurations
*
* @return Pointer to the attribute, NULL when idx is past the end
*/
const struct xnvme_be_attr *
xnvme_be_attr_get(int idx);