Changes in / [a4f8c3f:4708060d] in mainline


Ignore:
Location:
uspace
Files:
2 edited

Legend:

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

    ra4f8c3f r4708060d  
    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;
     
    592595        rc = futil_rcopy_contents(sysinst->futil, CFG_FILES_SRC,
    593596            CFG_FILES_DEST);
    594         if (rc != EOK)
    595                 return rc;
     597        if (rc != EOK) {
     598                sysinst_error(sysinst, "Error copying initial configuration "
     599                    "files.");
     600                return rc;
     601        }
    596602
    597603        return EOK;
     
    613619            "sysinst_copy_boot_files(): copy bootloader files");
    614620        rc = futil_rcopy_contents(sysinst->futil, BOOT_FILES_SRC, MOUNT_POINT);
    615         if (rc != EOK)
    616                 return rc;
     621        if (rc != EOK) {
     622                sysinst_error(sysinst, "Error copying bootloader "
     623                    "files.");
     624                return rc;
     625        }
    617626
    618627        sysinst_debug(sysinst, "sysinst_copy_boot_files(): OK");
     
    891900        errno_t rc;
    892901
     902        log_msg(LOG_DEFAULT, LVL_NOTE,
     903            "sysinst_eject_phys_by_mp(%s)", path);
     904
    893905        rc = vol_create(&vol);
    894906        if (rc != EOK) {
     
    934946        shutdown_failed = false;
    935947
     948        sysinst_action(sysinst, "Restarting the system.");
     949
    936950        rc = system_open(SYSTEM_DEFAULT, &sysinst_system_cb, NULL, &system);
    937951        if (rc != EOK) {
     
    983997{
    984998        errno_t rc;
     999        bool clean_dev = false;
    9851000
    9861001        sysinst_action(sysinst, "Creating device label and file system.");
     
    9881003        rc = sysinst_label_dev(sysinst, dev);
    9891004        if (rc != EOK)
    990                 return rc;
     1005                goto error;
     1006
     1007        clean_dev = true;
    9911008
    9921009        sysinst_action(sysinst, "Creating system directory structure.");
    9931010        rc = sysinst_setup_sysvol(sysinst);
    9941011        if (rc != EOK)
    995                 return rc;
     1012                goto error;
    9961013
    9971014        sysinst_action(sysinst, "Copying boot files.");
    9981015        rc = sysinst_copy_boot_files(sysinst);
    9991016        if (rc != EOK)
    1000                 return rc;
     1017                goto error;
    10011018
    10021019        sysinst_action(sysinst, "Configuring the system.");
    10031020        rc = sysinst_customize_initrd(sysinst);
    10041021        if (rc != EOK)
    1005                 return rc;
     1022                goto error;
    10061023
    10071024        sysinst_action(sysinst, "Finishing system volume.");
    10081025        rc = sysinst_finish_dev(sysinst);
    10091026        if (rc != EOK)
    1010                 return rc;
     1027                goto error;
     1028
     1029        clean_dev = false;
    10111030
    10121031        sysinst_action(sysinst, "Installing boot blocks.");
     
    10151034                return rc;
    10161035
    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;
     1036        return EOK;
     1037error:
     1038        if (clean_dev)
     1039                (void)sysinst_finish_dev(sysinst);
     1040        return rc;
    10231041}
    10241042
     
    10551073
    10561074        sysinst_progress_destroy(sysinst->progress);
     1075        sysinst->progress = NULL;
     1076
    10571077        rc = sysinst_restart_dlg_create(sysinst);
    10581078        if (rc != EOK)
     
    12331253static void sysinst_action(sysinst_t *sysinst, const char *action)
    12341254{
     1255        log_msg(LOG_DEFAULT, LVL_NOTE, "%s", action);
     1256
    12351257        if (sysinst->progress == NULL)
    12361258                return;
     
    12381260        ui_label_set_text(sysinst->progress->action, action);
    12391261        ui_label_paint(sysinst->progress->action);
    1240         log_msg(LOG_DEFAULT, LVL_NOTE, "%s", action);
    12411262}
    12421263
  • uspace/drv/hid/usbhid/mouse/mousedev.c

    ra4f8c3f r4708060d  
    11/*
     2 * Copyright (c) 2025 Jiri Svoboda
    23 * Copyright (c) 2011 Lubos Slovak, Vojtech Horky
    34 * Copyright (c) 2018 Ondrej Hlavaty
     
    166167        assert(mouse_dev != NULL);
    167168
    168         if (mouse_dev->mouse_sess == NULL) {
    169                 usb_log_warning(NAME " No console session.");
    170                 return;
    171         }
     169        if (mouse_dev->mouse_sess == NULL)
     170                return;
    172171
    173172        const usb_hid_report_field_t *move_x = get_mouse_axis_move_field(
Note: See TracChangeset for help on using the changeset viewer.