Don't be stupid.
This commit is contained in:
parent
7317e77da3
commit
3d72637f9b
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ _p9dir(struct stat *st, char *name, Dir *d, char **str, char *estr)
|
||||||
|
|
||||||
/* fetch real size for disks */
|
/* fetch real size for disks */
|
||||||
#ifdef _HAVEDISKSIZE
|
#ifdef _HAVEDISKSIZE
|
||||||
if((fd = open(name, O_RDONLY)) >= 0){
|
if(S_ISBLK(st->st_mode) && (fd = open(name, O_RDONLY)) >= 0){
|
||||||
d->length = disksize(fd, major(st->st_dev));
|
d->length = disksize(fd, major(st->st_dev));
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue