Ignore:
File:
1 edited

Legend:

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

    r61f28c4 r629b480  
    158158static void sysinst_futil_create_dir(void *, const char *);
    159159static errno_t sysinst_eject_dev(sysinst_t *, service_id_t);
    160 static errno_t sysinst_eject_phys_by_mp(sysinst_t *, const char *);
    161160
    162161static futil_cb_t sysinst_futil_cb = {
     
    273272        case 0:
    274273                /* OK */
    275                 sysinst_action(sysinst, "Ejecting installation media.");
    276                 (void)sysinst_eject_phys_by_mp(sysinst, CD_MOUNT_POINT);
    277274                (void)sysinst_restart(sysinst);
    278275                break;
     
    595592        rc = futil_rcopy_contents(sysinst->futil, CFG_FILES_SRC,
    596593            CFG_FILES_DEST);
    597         if (rc != EOK) {
    598                 sysinst_error(sysinst, "Error copying initial configuration "
    599                     "files.");
    600                 return rc;
    601         }
     594        if (rc != EOK)
     595                return rc;
    602596
    603597        return EOK;
     
    619613            "sysinst_copy_boot_files(): copy bootloader files");
    620614        rc = futil_rcopy_contents(sysinst->futil, BOOT_FILES_SRC, MOUNT_POINT);
    621         if (rc != EOK) {
    622                 sysinst_error(sysinst, "Error copying bootloader "
    623                     "files.");
    624                 return rc;
    625         }
     615        if (rc != EOK)
     616                return rc;
    626617
    627618        sysinst_debug(sysinst, "sysinst_copy_boot_files(): OK");
     
    900891        errno_t rc;
    901892
    902         log_msg(LOG_DEFAULT, LVL_NOTE,
    903             "sysinst_eject_phys_by_mp(%s)", path);
    904 
    905893        rc = vol_create(&vol);
    906894        if (rc != EOK) {
     
    946934        shutdown_failed = false;
    947935
    948         sysinst_action(sysinst, "Restarting the system.");
    949 
    950936        rc = system_open(SYSTEM_DEFAULT, &sysinst_system_cb, NULL, &system);
    951937        if (rc != EOK) {
     
    997983{
    998984        errno_t rc;
    999         bool clean_dev = false;
    1000985
    1001986        sysinst_action(sysinst, "Creating device label and file system.");
     
    1003988        rc = sysinst_label_dev(sysinst, dev);
    1004989        if (rc != EOK)
    1005                 goto error;
    1006 
    1007         clean_dev = true;
     990                return rc;
    1008991
    1009992        sysinst_action(sysinst, "Creating system directory structure.");
    1010993        rc = sysinst_setup_sysvol(sysinst);
    1011994        if (rc != EOK)
    1012                 goto error;
     995                return rc;
    1013996
    1014997        sysinst_action(sysinst, "Copying boot files.");
    1015998        rc = sysinst_copy_boot_files(sysinst);
    1016999        if (rc != EOK)
    1017                 goto error;
     1000                return rc;
    10181001
    10191002        sysinst_action(sysinst, "Configuring the system.");
    10201003        rc = sysinst_customize_initrd(sysinst);
    10211004        if (rc != EOK)
    1022                 goto error;
     1005                return rc;
    10231006
    10241007        sysinst_action(sysinst, "Finishing system volume.");
    10251008        rc = sysinst_finish_dev(sysinst);
    10261009        if (rc != EOK)
    1027                 goto error;
    1028 
    1029         clean_dev = false;
     1010                return rc;
    10301011
    10311012        sysinst_action(sysinst, "Installing boot blocks.");
     
    10341015                return rc;
    10351016
    1036         return EOK;
    1037 error:
    1038         if (clean_dev)
    1039                 (void)sysinst_finish_dev(sysinst);
    1040         return rc;
     1017        sysinst_action(sysinst, "Ejecting installation media.");
     1018        rc = sysinst_eject_phys_by_mp(sysinst, CD_MOUNT_POINT);
     1019        if (rc != EOK)
     1020                return rc;
     1021
     1022        return EOK;
    10411023}
    10421024
     
    10731055
    10741056        sysinst_progress_destroy(sysinst->progress);
    1075         sysinst->progress = NULL;
    1076 
    10771057        rc = sysinst_restart_dlg_create(sysinst);
    10781058        if (rc != EOK)
     
    12531233static void sysinst_action(sysinst_t *sysinst, const char *action)
    12541234{
    1255         log_msg(LOG_DEFAULT, LVL_NOTE, "%s", action);
    1256 
    12571235        if (sysinst->progress == NULL)
    12581236                return;
     
    12601238        ui_label_set_text(sysinst->progress->action, action);
    12611239        ui_label_paint(sysinst->progress->action);
     1240        log_msg(LOG_DEFAULT, LVL_NOTE, "%s", action);
    12621241}
    12631242
Note: See TracChangeset for help on using the changeset viewer.