Skip to content

Commit 0ee7f02

Browse files
hreineckeigaw
authored andcommitted
libnvme/nvme.i: Update subsystem definitions
Update subsystem definitions to include all attributes from the underlying structure. Signed-off-by: Hannes Reinecke <hare@suse.de>
1 parent ef351c2 commit 0ee7f02

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

libnvme/nvme.i

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,16 +415,24 @@ struct nvme_host {
415415
};
416416

417417
struct nvme_subsystem {
418+
%immutable sysfs_dir;
418419
%immutable subsysnqn;
419420
%immutable model;
420421
%immutable serial;
421422
%immutable firmware;
422-
%immutable application;
423+
%immutable subsystype;
424+
%immutable iopolicy;
423425
char *subsysnqn;
424426
char *model;
425427
char *serial;
426428
char *firmware;
427-
char *application;
429+
char *subsystype;
430+
431+
%extend {
432+
const char *sysfs_dir;
433+
const char *application;
434+
const char *iopolicy;
435+
}
428436
};
429437

430438
struct nvme_ctrl {
@@ -703,6 +711,18 @@ struct nvme_ns {
703711
struct nvme_host *nvme_subsystem_host_get(struct nvme_subsystem *s) {
704712
return nvme_subsystem_get_host(s);
705713
}
714+
const char *nvme_subsystem_sysfs_dir_get(struct nvme_subsystem *s) {
715+
return nvme_subsystem_get_sysfs_dir(s);
716+
}
717+
const char *nvme_subsystem_iopolicy_get(struct nvme_subsystem *s) {
718+
return nvme_subsystem_get_iopolicy(s);
719+
}
720+
const char *nvme_subsystem_application_get(struct nvme_subsystem *s) {
721+
return nvme_subsystem_get_application(s);
722+
}
723+
void nvme_subsystem_application_set(struct nvme_subsystem *s, const char *a) {
724+
nvme_subsystem_set_application(s, a);
725+
}
706726
%};
707727

708728
%extend ctrl_iter {

0 commit comments

Comments
 (0)