int len = strlen(block);
char *point = NULL, *pos, *tmp, *cpoint, *devname;
struct stat s;
+ int rstat;
unsigned int minor, major;
if (!fp)
return NULL;
- if (stat(block, &s))
- return NULL;
+ rstat = stat(block, &s);
while (fgets(line, sizeof(line), fp)) {
pos = strchr(line, ' ');
break;
}
+ if (rstat)
+ continue;
+
if (!S_ISBLK(s.st_mode))
continue;
tag, errno, strerror(errno));
fclose(fp);
- if (*uuid || !strcasecmp(uuid, pr->uuid))
+ if (*uuid && !strcasecmp(uuid, pr->uuid))
return 0;
ULOG_ERR("extroot: UUID mismatch (root: %s, %s: %s)\n",