summaryrefslogtreecommitdiffstats
path: root/nvme.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-12 12:01:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-12 12:01:09 +0000
commitfb32fdeba1f428a3f6c30c8951e82f2a2eec23a8 (patch)
tree36d82f6126d57ee3049109591b3ea9e805bca867 /nvme.h
parentReleasing debian version 1.14-4. (diff)
downloadnvme-cli-fb32fdeba1f428a3f6c30c8951e82f2a2eec23a8.tar.xz
nvme-cli-fb32fdeba1f428a3f6c30c8951e82f2a2eec23a8.zip
Merging upstream version 1.15.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'nvme.h')
-rw-r--r--nvme.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/nvme.h b/nvme.h
index e33094d..5150c8d 100644
--- a/nvme.h
+++ b/nvme.h
@@ -82,6 +82,7 @@ struct nvme_ctrl {
char *traddr;
char *trsvcid;
char *host_traddr;
+ char *host_iface;
char *hostnqn;
char *hostid;
@@ -120,6 +121,7 @@ enum nvme_print_flags validate_output_format(const char *format);
int __id_ctrl(int argc, char **argv, struct command *cmd,
struct plugin *plugin, void (*vs)(__u8 *vs, struct json_object *root));
char *nvme_char_from_block(char *block);
+int nvme_logical_block_size_from_ns_char(const char *dev);
void *mmap_registers(const char *dev);
extern int current_index;
@@ -144,4 +146,11 @@ int uuid_from_systemd(char *uuid);
unsigned long long elapsed_utime(struct timeval start_time,
struct timeval end_time);
+
+static inline void nvme_strip_spaces(char *s, int l)
+{
+ while (l && (s[l] == '\0' || s[l] == ' '))
+ s[l--] = '\0';
+}
+
#endif /* _NVME_H */