tDon't be stupid. - plan9port - [fork] Plan 9 from user space | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 3d72637f9b4c42b1fc9b7d95d278ea3dd65c748d | |
parent 7317e77da344d1a5eff16e28771dcda91acd4ae3 | |
Author: rsc | |
Date: Mon, 26 Apr 2004 19:28:28 +0000 Don't be stupid. Diffstat: M src/lib9/_p9dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- | |
diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c | |
t@@ -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); } |