Changeset 61f28c4 in mainline


Ignore:
Timestamp:
2025-05-07T09:46:49Z (27 hours ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
3599384, 4708060d
Parents:
0cec807a
git-author:
Jiri Svoboda <jiri@…> (2025-05-06 17:46:39)
git-committer:
Jiri Svoboda <jiri@…> (2025-05-07 09:46:49)
Message:

Only eject installation CD after user confirms restart.

File:
1 edited

Legend:

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

    r0cec807a r61f28c4  
    158158static void sysinst_futil_create_dir(void *, const char *);
    159159static errno_t sysinst_eject_dev(sysinst_t *, service_id_t);
     160static errno_t sysinst_eject_phys_by_mp(sysinst_t *, const char *);
    160161
    161162static futil_cb_t sysinst_futil_cb = {
     
    272273        case 0:
    273274                /* OK */
     275                sysinst_action(sysinst, "Ejecting installation media.");
     276                (void)sysinst_eject_phys_by_mp(sysinst, CD_MOUNT_POINT);
    274277                (void)sysinst_restart(sysinst);
    275278                break;
     
    897900        errno_t rc;
    898901
     902        log_msg(LOG_DEFAULT, LVL_NOTE,
     903            "sysinst_eject_phys_by_mp(%s)", path);
     904
    899905        rc = vol_create(&vol);
    900906        if (rc != EOK) {
     
    940946        shutdown_failed = false;
    941947
     948        sysinst_action(sysinst, "Restarting the system.");
     949
    942950        rc = system_open(SYSTEM_DEFAULT, &sysinst_system_cb, NULL, &system);
    943951        if (rc != EOK) {
     
    10231031        sysinst_action(sysinst, "Installing boot blocks.");
    10241032        rc = sysinst_copy_boot_blocks(sysinst, dev);
    1025         if (rc != EOK)
    1026                 return rc;
    1027 
    1028         sysinst_action(sysinst, "Ejecting installation media.");
    1029         rc = sysinst_eject_phys_by_mp(sysinst, CD_MOUNT_POINT);
    10301033        if (rc != EOK)
    10311034                return rc;
     
    10701073
    10711074        sysinst_progress_destroy(sysinst->progress);
     1075        sysinst->progress = NULL;
     1076
    10721077        rc = sysinst_restart_dlg_create(sysinst);
    10731078        if (rc != EOK)
     
    12481253static void sysinst_action(sysinst_t *sysinst, const char *action)
    12491254{
     1255        log_msg(LOG_DEFAULT, LVL_NOTE, "%s", action);
     1256
    12501257        if (sysinst->progress == NULL)
    12511258                return;
     
    12531260        ui_label_set_text(sysinst->progress->action, action);
    12541261        ui_label_paint(sysinst->progress->action);
    1255         log_msg(LOG_DEFAULT, LVL_NOTE, "%s", action);
    12561262}
    12571263
Note: See TracChangeset for help on using the changeset viewer.