diff options
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -592,13 +592,13 @@ static char* find_mount_point(char *block) 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, ' '); @@ -658,6 +658,9 @@ static char* find_mount_point(char *block) break; } + if (rstat) + continue; + if (!S_ISBLK(s.st_mode)) continue; |