Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-who committed Feb 16, 2024
1 parent 460642f commit 80d2356
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spit/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ deviceDetails *addDeviceDetails(const char *fn, deviceDetails **devs, size_t *nu
return NULL;
// return &(*devs)[i];
}
if (fnserial && (strlen(fnserial) >= 5) && (strcmp(fnserial, fnserial2) == 0)) {
if (fnserial && fnserial2 && (strlen(fnserial) >= 5) && (strcmp(fnserial, fnserial2) == 0)) {
fprintf(stderr, "*warning* ignoring '%s', it shares a serial number '%s' with '%s'\n", fn, fnserial2,
dcmp->devicename);
return NULL;
Expand Down Expand Up @@ -105,9 +105,14 @@ size_t loadDeviceDetails(const char *fn, deviceDetails **devs, size_t *numDevs)
if (!hasanuma) hasanuma = 1;
}

if (blockDeviceSize(line) < 1) {
continue;
}

deviceDetails *d = addDeviceDetails(line, devs, numDevs);
if (d) {
d->numa = numa;

// fprintf(stderr,"--> %s %d\n", line, numa);
// addDeviceToAnalyse(line);
add++;
Expand Down

0 comments on commit 80d2356

Please sign in to comment.