Changeset 1954 for Whitix/tags

Show
Ignore:
Timestamp:
02/28/09 16:00:16 (3 years ago)
Author:
mwhitworth
Message:

Add extra checks in installer.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/tags/0.2b/user/system/installer/textinstaller.c

    r1910 r1954  
    7474                strcpy(dev, devName); 
    7575                 
    76         sprintf(drive, "/System/Devices/Storage/%s\n", p); 
     76        sprintf(drive, "/System/Devices/Storage/%s", p); 
    7777        free(driveName); 
    7878 
     
    122122                return 0; 
    123123        } 
     124         
     125        printf("Creating directories\n"); 
    124126         
    125127        /* Install files! */ 
     
    141143         
    142144        int fdDisk = SysOpen(drive, _SYS_FILE_READ | _SYS_FILE_WRITE, 0); 
     145         
     146        if (fdDisk < 0) 
     147        { 
     148                printf("Could not open disk to copy over MBR and bootloader. drive = '%s', err = %d\n", drive, fdDisk); 
     149                return 0; 
     150        } 
     151         
    143152        int fd2=SysOpen("/Boot/stage1", _SYS_FILE_READ | _SYS_FILE_FORCE_OPEN, 0); 
    144153 
     
    213222        ModuleCopy("Filesystems/icfs.sys"); 
    214223        ModuleCopy("Core/ata_ide.sys"); 
    215         ModuleCopy("Core/startup.sys"); 
    216224        ModuleCopy("Input/Ps2.sys"); 
    217225        ModuleCopy("Input/keyboard.sys");