1
0
Fork 0
nvme-cli/wrapper.c
Daniel Baumann 316e846c86
Merging upstream version 2.1~rc0 (Closes: #1015722).
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-16 12:16:19 +01:00

22 lines
451 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* This file is part of nvme-cli
*
* Copyright (c) 2022 Daniel Wagner, SUSE
*/
#include <dlfcn.h>
#include <libnvme.h>
const char * __attribute__((weak)) nvme_get_version(enum nvme_version type)
{
const char *(*libnvme_get_version)(enum nvme_version type);
libnvme_get_version = dlsym(RTLD_NEXT, "nvme_get_version");
if (libnvme_get_version)
return libnvme_get_version(type);
return "n/a";
}