Changeset 552 for trunk/dll/valid.c
- Timestamp:
- Mar 1, 2007, 7:24:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/valid.c
r551 r552 20 20 22 Oct 06 GKY Add NDFS32 support 21 21 22 Oct 06 GKY Increased BUFFER_BYTES in CheckDrive to 8192 to fix NDFS32 scan failure 22 07 Jan 07 GKY Move error strings etc. to string file 23 18 Feb 07 GKY Add more drive types and icons 22 24 23 25 ***********************************************************************/ … … 210 212 211 213 # define BUFFER_BYTES 8192 212 rc = 213 DosAllocMem(&pvBuffer, BUFFER_BYTES, 214 rc = DosAllocMem(&pvBuffer, BUFFER_BYTES, 214 215 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE); 215 216 if (rc) { … … 242 243 } 243 244 244 if (pulType && !strcmp(pfsn, CDFS))245 if (pulType && (!strcmp(pfsn, CDFS) || !strcmp(pfsn, ISOFS))) 245 246 *pulType |= DRIVE_NOTWRITEABLE | DRIVE_CDROM | DRIVE_REMOVABLE; 246 247 if (((PFSQBUFFER2) pvBuffer)->iType == FSAT_REMOTEDRV) { 247 if (pulType && !strcmp(pfsn, NDFS32)){ 248 *pulType |= DRIVE_VIRTUAL; 249 } 250 if (pulType && !strcmp(pfsn, RAMFS)){ 251 *pulType |= DRIVE_RAMDISK; 252 } 253 if (((PFSQBUFFER2) pvBuffer)->iType == FSAT_REMOTEDRV && 254 (strcmp(pfsn, CDFS) && strcmp(pfsn, ISOFS))) { 248 255 if (pulType) 249 256 *pulType |= DRIVE_REMOTE; 257 250 258 if (pulType && !strcmp(pfsn, CBSIFS)) { 251 259 *pulType |= DRIVE_ZIPSTREAM; … … 261 269 *pulType &= ~DRIVE_NOLONGNAMES; 262 270 } 271 263 272 } 264 273 } … … 267 276 !strcmp(pfsn, JFS) || 268 277 !strcmp(pfsn, FAT32) || 269 !strcmp(pfsn, NDFS32) || !strcmp(pfsn, HPFS386))) { 278 !strcmp(pfsn, RAMFS) || 279 !strcmp(pfsn, NDFS32) || 280 !strcmp(pfsn, HPFS386))) { 270 281 *pulType &= ~DRIVE_NOLONGNAMES; 271 282 } 283 272 284 DosFreeMem(pvBuffer); 273 285 return 0; // Remotes are non-removable … … 278 290 strcmp(pfsn, JFS) && 279 291 strcmp(pfsn, CDFS) && 280 strcmp(pfsn, FAT32) && strcmp(pfsn, NDFS32) && strcmp(pfsn, HPFS386)) { 292 strcmp(pfsn, ISOFS) && 293 strcmp(pfsn, RAMFS) && 294 strcmp(pfsn, FAT32) && 295 strcmp(pfsn, NDFS32) && 296 strcmp(pfsn, HPFS386)) { 281 297 if (pulType) 282 298 (*pulType) |= DRIVE_NOLONGNAMES; // Others can not have long names 283 299 } 300 284 301 285 302 DosError(FERR_DISABLEHARDERR); … … 543 560 } 544 561 } 562 else if (*argv[x] == '`' && isalpha(argv[x][1])) { 563 564 CHAR *p = &argv[x][1]; 565 566 while (isalpha(*p)) { 567 driveflags[toupper(*p) - 'A'] |= DRIVE_NOSTATS; 568 p++; 569 } 570 } 545 571 else if (*argv[x] == ',' && isalpha(argv[x][1])) { 546 572 … … 552 578 } 553 579 } 554 else if (*argv[x] == ' `' && isalpha(argv[x][1])) {580 else if (*argv[x] == '-' && isalpha(argv[x][1])) { 555 581 556 582 CHAR *p = &argv[x][1]; … … 586 612 driveflags[x] &= (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 587 613 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | 588 DRIVE_INCLUDEFILES | DRIVE_SLOW );614 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS); 589 615 if (removable != -1) { 590 616 struct … … 608 634 if (drvtype & DRIVE_REMOTE) 609 635 driveflags[x] |= DRIVE_REMOTE; 636 if(!stricmp(FileSystem,NDFS32)){ 637 driveflags[x] |= DRIVE_VIRTUAL; 638 driveflags[x] &= (~DRIVE_REMOTE); 639 } 640 if(!stricmp(FileSystem,RAMFS)){ 641 driveflags[x] |= DRIVE_RAMDISK; 642 driveflags[x] &= (~DRIVE_REMOTE); 643 } 610 644 if (strcmp(FileSystem, HPFS) && 611 645 strcmp(FileSystem, JFS) && 612 646 strcmp(FileSystem, CDFS) && 613 strcmp(FileSystem, FAT32) && strcmp(FileSystem, HPFS386)) { 647 strcmp(FileSystem, ISOFS) && 648 strcmp(FileSystem, RAMFS) && 649 strcmp(FileSystem, FAT32) && 650 strcmp(FileSystem, HPFS386)) { 614 651 driveflags[x] |= DRIVE_NOLONGNAMES; 615 652 } 616 if (!strcmp(FileSystem, CDFS)) { 653 654 if (!strcmp(FileSystem, CDFS) || !strcmp(FileSystem, ISOFS)) { 617 655 removable = 1; 618 656 driveflags[x] |= (DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE | DRIVE_CDROM); … … 636 674 driveflags[x] &= (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 637 675 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | 638 DRIVE_INCLUDEFILES | DRIVE_SLOW );676 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS); 639 677 memset(driveserial, -1, sizeof(driveserial)); 640 678 DosError(FERR_DISABLEHARDERR); … … 737 775 *pp = ' '; 738 776 pp++; 777 *pp = '-'; 778 pp[1] = 0; 779 p = pp + 1; 780 if (pp) { 781 for (x = 0; x < 26; x++) { 782 if ((driveflags[x] & DRIVE_NOLOADSUBJS) != 0) { 783 *p = (CHAR) x + 'A'; 784 p++; 785 *p = 0; 786 } 787 } 788 } 789 if (!pp[1]) 790 *pp = 0; 791 pp = &s[strlen(s)]; 792 *pp = ' '; 793 pp++; 739 794 *pp = '`'; 740 795 pp[1] = 0; … … 742 797 if (pp) { 743 798 for (x = 0; x < 26; x++) { 744 if ((driveflags[x] & DRIVE_NO LOADSUBJS) != 0) {799 if ((driveflags[x] & DRIVE_NOSTATS) != 0) { 745 800 *p = (CHAR) x + 'A'; 746 801 p++; … … 871 926 } 872 927 if (!*objectpath) { 873 // Fall back - fixme to work for NLS928 // Fall back 874 929 DosError(FERR_DISABLEHARDERR); 875 930 DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE, 876 931 (PVOID) & startdrive, (ULONG) sizeof(ULONG)); 877 sprintf(objectpath, "%c:\\DESKTOP", ((CHAR) startdrive) + '@');878 } 879 } 880 } 932 sprintf(objectpath, GetPString(IDS_PATHTODESKTOP), ((CHAR) startdrive) + '@'); 933 } 934 } 935 }
Note:
See TracChangeset
for help on using the changeset viewer.