Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sysinst/sysinst.c

    r5a6cc679 r5f36841  
    4747#include <task.h>
    4848#include <vfs/vfs.h>
     49#include <str.h>
    4950
    5051#include "futil.h"
     
    6869#define MOUNT_POINT "/inst"
    6970
    70 /** Device containing HelenOS live CD */
    71 #define CD_DEV "devices/\\hw\\pci0\\00:01.0\\ata-c2\\d0"
    72 
    73 #define CD_FS_TYPE "cdfs"
    74 #define CD_FS_SRV "/srv/cdfs"
    75 #define CD_MOUNT_POINT "/cdrom"
    76 
    77 #define BOOT_FILES_SRC "/cdrom"
     71/** HelenOS live CD volume label */
     72#define CD_VOL_LABEL "HelenOS-CD"
     73#define CD_MOUNT_POINT "/vol/" CD_VOL_LABEL
     74
     75#define BOOT_FILES_SRC CD_MOUNT_POINT
    7876#define BOOT_BLOCK_IDX 0 /* MBR */
    7977
     
    195193static errno_t sysinst_copy_boot_files(void)
    196194{
    197         task_wait_t twait;
    198         task_exit_t texit;
    199         errno_t rc;
    200         int trc;
    201 
    202         printf("sysinst_copy_boot_files(): start filesystem server\n");
    203         rc = task_spawnl(NULL, &twait, CD_FS_SRV, CD_FS_SRV, NULL);
    204         if (rc != EOK)
    205                 return rc;
    206 
    207         printf("sysinst_copy_boot_files(): wait for filesystem server\n");
    208         rc = task_wait(&twait, &texit, &trc);
    209         if (rc != EOK)
    210                 return rc;
    211 
    212         printf("sysinst_copy_boot_files(): verify filesystem server result\n");
    213         if (texit != TASK_EXIT_NORMAL || trc != 0) {
    214                 printf("sysinst_fs_mount(): not successful, but could be already loaded.\n");
    215         }
    216 
    217         printf("sysinst_copy_boot_files(): create CD mount point\n");
    218         rc = vfs_link_path(CD_MOUNT_POINT, KIND_DIRECTORY, NULL);
    219         if (rc != EOK)
    220                 return rc;
    221 
    222         printf("sysinst_copy_boot_files(): mount CD filesystem\n");
    223         rc = vfs_mount_path(CD_MOUNT_POINT, CD_FS_TYPE, CD_DEV, "", 0, 0);
    224         if (rc != EOK)
    225                 return rc;
     195        errno_t rc;
    226196
    227197        printf("sysinst_copy_boot_files(): copy bootloader files\n");
Note: See TracChangeset for help on using the changeset viewer.