Changeset eebecdc in mainline for uspace/lib/system/src/system.c


Ignore:
Timestamp:
2025-03-13T18:30:36Z (2 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
e3e53cc
Parents:
e494d7b (diff), da54714 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge upstream/master into helenraid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/system/src/system.c

    re494d7b reebecdc  
    11/*
    2  * Copyright (c) 2024 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    141141}
    142142
    143 /** Shut the system down.
     143/** Shut down and power the system off.
    144144 *
    145145 * This function is asynchronous. It returns immediately with success
     
    151151 * @return EOK on succes or an error code
    152152 */
    153 errno_t system_shutdown(system_t *system)
     153errno_t system_poweroff(system_t *system)
    154154{
    155155        async_exch_t *exch = async_exchange_begin(system->sess);
    156         errno_t rc = async_req_0_0(exch, SYSTEM_SHUTDOWN);
     156        errno_t rc = async_req_0_0(exch, SYSTEM_POWEROFF);
     157        async_exchange_end(exch);
     158
     159        return rc;
     160}
     161
     162/** Shut down and restart the system.
     163 *
     164 * This function is asynchronous. It returns immediately with success
     165 * if the system started shutting down. Once shutdown is completed,
     166 * the @c shutdown_complete callback is executed. If the shutdown fails,
     167 * the @c shutdown_fail callback is executed.
     168 *
     169 * @param system System control service
     170 * @return EOK on succes or an error code
     171 */
     172errno_t system_restart(system_t *system)
     173{
     174        async_exch_t *exch = async_exchange_begin(system->sess);
     175        errno_t rc = async_req_0_0(exch, SYSTEM_RESTART);
    157176        async_exchange_end(exch);
    158177
Note: See TracChangeset for help on using the changeset viewer.