Skip to content

Commit 0155402

Browse files
author
Martin Belanger
committed
Add discovery_ctrl_set() to Python bindings.
Following Hannes' recent TP8013 changes, we need to add this method to the Python bindings. Signed-off-by: Martin Belanger <[email protected]>
1 parent b310ad7 commit 0155402

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

libnvme/nvme.i

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ struct nvme_ctrl {
295295
%immutable serial;
296296
%immutable sqsize;
297297
%immutable persistent;
298+
%immutable discovery_ctrl;
298299
char *transport;
299300
char *subsysnqn;
300301
char *traddr;
@@ -308,6 +309,7 @@ struct nvme_ctrl {
308309
char *serial;
309310
char *sqsize;
310311
bool persistent;
312+
bool discovery_ctrl;
311313
};
312314

313315
struct nvme_ns {
@@ -502,6 +504,10 @@ struct nvme_ns {
502504
nvme_free_ctrl($self);
503505
}
504506

507+
void discovery_ctrl_set(bool discovery) {
508+
nvme_ctrl_set_discovery_ctrl($self, discovery);
509+
}
510+
505511
bool init(struct nvme_host *h, int instance) {
506512
return nvme_init_ctrl(h, $self, instance) == 0;
507513
}

src/libnvme.map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ LIBNVME_1_0 {
3434
nvme_ctrl_next_ns;
3535
nvme_ctrl_next_path;
3636
nvme_ctrl_reset;
37+
nvme_ctrl_set_discovery_ctrl;
3738
nvme_ctrl_set_persistent;
3839
nvme_ctrls_filter;
3940
nvme_default_host;

0 commit comments

Comments
 (0)