Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libnvme/src/nvme/no-mi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

#include <libnvme.h>

const char *libnvme_mi_status_to_string(int status)
#include "compiler-attributes.h"

__public const char *libnvme_mi_status_to_string(int status)
{
return "MI support disabled";
}
Expand Down
4 changes: 4 additions & 0 deletions libnvme/src/nvme/private-mi.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#ifdef CONFIG_MI

#include <poll.h>
#include <stdbool.h>
#include <stddef.h>
Expand Down Expand Up @@ -116,6 +118,8 @@ void __libnvme_mi_mctp_set_ops(const struct __mi_mctp_socket_ops *newops);
*/
#define LIBNVME_QUIRK_CSI_1_NOT_SUPPORTED (1 << 1)

#endif

int __libnvme_transport_handle_open_mi(struct libnvme_transport_handle *hdl,
const char *devname);
int __libnvme_transport_handle_init_mi(struct libnvme_transport_handle *hdl);
Expand Down
42 changes: 22 additions & 20 deletions libnvme/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -77,29 +77,31 @@ zns = executable(
],
)

mi = executable(
'test-mi',
['mi.c', 'utils.c'],
dependencies: [
config_dep,
ccan_dep,
libnvme_test_dep,
],
)
if want_mi
mi = executable(
'test-mi',
['mi.c', 'utils.c'],
dependencies: [
config_dep,
ccan_dep,
libnvme_test_dep,
],
)

test('libnvme - mi', mi)
test('libnvme - mi', mi)

mi_mctp = executable(
'test-mi-mctp',
['mi-mctp.c', 'utils.c'],
dependencies: [
config_dep,
ccan_dep,
libnvme_test_dep,
],
)
mi_mctp = executable(
'test-mi-mctp',
['mi-mctp.c', 'utils.c'],
dependencies: [
config_dep,
ccan_dep,
libnvme_test_dep,
],
)

test('libnvme - mi-mctp', mi_mctp)
test('libnvme - mi-mctp', mi_mctp)
endif

uuid = executable(
'test-uuid',
Expand Down
Loading