1
0
Fork 0

Adding upstream version 2.6.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:24:26 +01:00
parent acf5b2ec4c
commit 83f51a6dde
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
262 changed files with 7434 additions and 3024 deletions

14
nvme.h
View file

@ -29,6 +29,7 @@
#include "plugin.h"
#include "util/json.h"
#include "util/argconfig.h"
#include "util/cleanup.h"
enum nvme_print_flags {
NORMAL = 0,
@ -100,15 +101,24 @@ int parse_and_open(struct nvme_dev **dev, int argc, char **argv, const char *des
void dev_close(struct nvme_dev *dev);
static inline void cleanup_nvme_dev(struct nvme_dev **dev)
{
if (*dev)
dev_close(*dev);
}
#define _cleanup_nvme_dev_ __cleanup__(cleanup_nvme_dev)
extern const char *output_format;
enum nvme_print_flags validate_output_format(const char *format);
bool nvme_is_output_format_json(void);
int __id_ctrl(int argc, char **argv, struct command *cmd,
struct plugin *plugin, void (*vs)(uint8_t *vs, struct json_object *root));
extern int current_index;
void *nvme_alloc(size_t len, bool *huge);
void nvme_free(void *p, bool huge);
void *nvme_alloc_huge(size_t len, bool *huge);
void nvme_free_huge(void *p, bool huge);
const char *nvme_strerror(int errnum);
unsigned long long elapsed_utime(struct timeval start_time,