Mercurial > hg > Members > kono > os9 > sbc09
comparison src/vdisk.c @ 152:97a597b0afcd
Linux version
author | kono |
---|---|
date | Thu, 17 Jan 2019 16:54:05 +0900 |
parents | ef5959682d03 |
children | dc4c7e7ec5c9 |
comparison
equal
deleted
inserted
replaced
151:ef5959682d03 | 152:97a597b0afcd |
---|---|
340 int i = 0; | 340 int i = 0; |
341 while ((dp = readdir(dir)) != NULL && dircount-->=0) { | 341 while ((dp = readdir(dir)) != NULL && dircount-->=0) { |
342 int j = 0; | 342 int j = 0; |
343 for(j = 0; j < DIR_NM ; j++) { | 343 for(j = 0; j < DIR_NM ; j++) { |
344 if (j< dp->d_namlen) { | 344 if (j< dp->d_namlen) { |
345 pd->dirfp[i+j] = dp->d_name[j]&0x7f; | 345 pd->dirfp[i+j] = dp->d_name[j]&0x7f; // this is wrong but os9 does not allow 8th bit |
346 if (j== dp->d_namlen-1) | 346 if (j== dp->d_namlen-1 || dp->d_name[j+1]==0) { |
347 pd->dirfp[i+j] |= 0x80; // os9 EOL | 347 pd->dirfp[i+j] |= 0x80; // os9 EOL |
348 } | |
348 } else | 349 } else |
349 pd->dirfp[i+j] = 0; | 350 pd->dirfp[i+j] = 0; |
350 } | 351 } |
351 pd->dirfp[i+j] = (dp->d_ino&0xff0000)>>16; | 352 pd->dirfp[i+j] = (dp->d_ino&0xff0000)>>16; |
352 pd->dirfp[i+j+1] = (dp->d_ino&0xff00)>>8; | 353 pd->dirfp[i+j+1] = (dp->d_ino&0xff00)>>8; |