Merging upstream version 2.13.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
adb2e5e05d
commit
8599c7290c
579 changed files with 6165 additions and 1687 deletions
11
nvme-print.c
11
nvme-print.c
|
@ -26,6 +26,8 @@
|
|||
#define nvme_print_output_format(name, ...) \
|
||||
nvme_print(name, nvme_is_output_format_json() ? JSON : NORMAL, ##__VA_ARGS__);
|
||||
|
||||
char *alloc_error = "Could not allocate string";
|
||||
|
||||
static struct print_ops *nvme_print_ops(nvme_print_flags_t flags)
|
||||
{
|
||||
struct print_ops *ops = NULL;
|
||||
|
@ -1460,15 +1462,20 @@ void nvme_show_message(bool error, const char *msg, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
void nvme_show_perror(const char *msg)
|
||||
void nvme_show_perror(const char *msg, ...)
|
||||
{
|
||||
struct print_ops *ops = nvme_print_ops(NORMAL);
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, msg);
|
||||
|
||||
if (nvme_is_output_format_json())
|
||||
ops = nvme_print_ops(JSON);
|
||||
|
||||
if (ops && ops->show_perror)
|
||||
ops->show_perror(msg);
|
||||
ops->show_perror(msg, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void nvme_show_discovery_log(struct nvmf_discovery_log *log, uint64_t numrec,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue