diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-12 12:01:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-12 12:01:05 +0000 |
commit | ec3ece1465351c6208395b7f506728e9b918b05a (patch) | |
tree | 70c498b99e795bb0abafc7eb4207c515188025ff /nvme.h | |
parent | Adding upstream version 1.14. (diff) | |
download | nvme-cli-ec3ece1465351c6208395b7f506728e9b918b05a.tar.xz nvme-cli-ec3ece1465351c6208395b7f506728e9b918b05a.zip |
Adding upstream version 1.15.upstream/1.15
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | nvme.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 */ |