Merging upstream version 2.1~rc0 (Closes: #1015722).
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
9489161ac8
commit
316e846c86
504 changed files with 6751 additions and 2957 deletions
22
wrapper.c
Normal file
22
wrapper.c
Normal file
|
@ -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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue