Introduction
Introduction Statistics Contact Development Disclaimer Help
tagain - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 43f16cfa921aabdddf07bc996d8690dd66c1f364
parent 69bdb78dec6cd3050b5b26764e017a51999e7d14
Author: rsc <devnull@localhost>
Date: Fri, 11 May 2007 00:20:51 +0000
again
Diffstat:
M src/lib9/_p9dir.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c
t@@ -70,14 +70,16 @@ static int
isdisk(struct stat *st)
{
char *name;
- int i;
+ int i, len;
if(!S_ISCHR(st->st_mode))
return 0;
name = devname(st->st_rdev, S_IFCHR);
- for(i=0; i<nelem(diskdev); i++)
- if(strcmp(diskdev[i], name) == 0)
+ for(i=0; i<nelem(diskdev); i++){
+ len = strlen(diskdev[i]);
+ if(strncmp(diskdev[i], name, len) == 0 && isdigit((uchar)name[…
return 1;
+ }
return 0;
}
#endif
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.