1
0
Fork 0

Merging upstream version 2.13.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-04-13 11:50:38 +02:00
parent adb2e5e05d
commit 8599c7290c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
579 changed files with 6165 additions and 1687 deletions

View file

@ -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,