mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
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 */
|
||||
#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));
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue