1
0
Fork 0

Merging upstream version 2.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:15:45 +01:00
parent 888be815c6
commit e4376063b0
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
521 changed files with 21541 additions and 21644 deletions

View file

@ -5,13 +5,9 @@
#include <unistd.h>
#include <inttypes.h>
#include "linux/nvme_ioctl.h"
#include "nvme.h"
#include "nvme-print.h"
#include "nvme-ioctl.h"
#include "libnvme.h"
#include "plugin.h"
#include "argconfig.h"
#include "suffix.h"
#define CREATE_CMD
#include "transcend-nvme.h"
@ -37,7 +33,7 @@ static int getHealthValue(int argc, char **argv, struct command *cmd, struct plu
printf("\nDevice not found \n");;
return -1;
}
result = nvme_smart_log(fd, 0xffffffff, &smart_log);
result = nvme_get_log_smart(fd, 0xffffffff, true, &smart_log);
if (!result) {
printf("Transcend NVME heath value: ");
percent_used =smart_log.percent_used;
@ -82,7 +78,7 @@ static int getBadblock(int argc, char **argv, struct command *cmd, struct plugin
nvmecmd.cdw12=DW12_BAD_BLOCK;
nvmecmd.addr = (__u64)(uintptr_t)data;
nvmecmd.data_len = 0x1;
result = nvme_submit_admin_passthru(fd,&nvmecmd);
result = nvme_submit_admin_passthru(fd, &nvmecmd, NULL);
if(!result) {
int badblock = data[0];
printf("Transcend NVME badblock count: %d\n",badblock);