1
0
Fork 0

Merging upstream version 1.1~rc0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 10:03:28 +01:00
parent 537ee18b08
commit 73281abe5f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
764 changed files with 32602 additions and 5874 deletions

View file

@ -55,7 +55,6 @@ static void save_telemetry(nvme_ctrl_t c)
free(log);
return;
}
log_size = (le16_to_cpu(log->dalb3) + 1) * NVME_LOG_TELEM_BLOCK_SIZE;
fd = open(buf, O_CREAT|O_WRONLY, S_IRUSR|S_IRGRP);
if (fd < 0) {
@ -67,7 +66,7 @@ static void save_telemetry(nvme_ctrl_t c)
if (ret < 0)
printf("failed to write telemetry log\n");
else
printf("telemetry log save as %s, wrote:%d size:%ld\n", buf,
printf("telemetry log save as %s, wrote:%d size:%zd\n", buf,
ret, log_size);
close(fd);
free(log);
@ -77,8 +76,10 @@ static void check_telemetry(nvme_ctrl_t c, int ufd)
{
char buf[0x1000] = { 0 };
char *p, *ptr;
int len;
if (read(ufd, buf, sizeof(buf)) < 0)
len = read(ufd, buf, sizeof(buf) - 1);
if (len < 0)
return;
ptr = buf;
@ -140,7 +141,7 @@ int main()
nvme_subsystem_for_each_ctrl(s, c)
i++;
e = calloc(i, sizeof(e));
e = calloc(i, sizeof(struct events));
FD_ZERO(&fds);
i = 0;