Changeset 8300c72 in mainline for uspace/srv/system/system.c


Ignore:
Timestamp:
2025-03-03T22:58:05Z (5 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
77a0119
Parents:
f35749e
Message:

Quiesce devices before proceeding with shutdown.

Only implemented for e1k, uhci and xhci.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/system/system.c

    rf35749e r8300c72  
    3535 */
    3636
     37#include <devman.h>
    3738#include <fibril.h>
    3839#include <futil.h>
     
    522523        /* Eject all volumes. */
    523524
     525        log_msg(LOG_DEFAULT, LVL_NOTE, "Ejecting volumes.");
     526
    524527        rc = vol_create(&vol);
    525528        if (rc != EOK) {
     
    545548
    546549        free(part_ids);
     550        part_ids = NULL;
    547551        vol_destroy(vol);
     552        vol = NULL;
     553
     554        /* Quiesce the device tree. */
     555
     556        log_msg(LOG_DEFAULT, LVL_NOTE, "Quiescing devices.");
     557
     558        rc = devman_quiesce_devices("/hw");
     559        if (rc != EOK) {
     560                log_msg(LOG_DEFAULT, LVL_ERROR,
     561                    "Failed to quiesce device tree.");
     562                goto error;
     563        }
     564
    548565        return EOK;
    549566error:
Note: See TracChangeset for help on using the changeset viewer.