diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:33 +0000 |
commit | a751023422eadf87cd8d6484878193a4914a9d85 (patch) | |
tree | 3fca0ae6325173fc2583e7d88abe4c38e6193277 /wrapper.c | |
parent | Adding upstream version 2.0. (diff) | |
download | nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.tar.xz nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.zip |
Adding upstream version 2.1~rc0.upstream/2.1_rc0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | wrapper.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/wrapper.c b/wrapper.c new file mode 100644 index 0000000..7341631 --- /dev/null +++ b/wrapper.c @@ -0,0 +1,22 @@ +// 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"; +} |