Changeset 9546146 in mainline for uspace/srv/hid/display/main.c


Ignore:
Timestamp:
2024-08-23T18:02:06Z (3 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
4af6fb1
Parents:
ca95ccd
Message:

Persistently store display/seat configuration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/main.c

    rca95ccd r9546146  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    6262#include "wmops.h"
    6363
     64const char *cfg_file_path = "/w/cfg/display.sif";
     65
    6466static void display_client_conn(ipc_call_t *, void *);
    6567static void display_client_ev_pending(void *);
     
    137139                goto error;
    138140
    139         rc = ds_seat_create(disp, "Alice", &seat);
    140         if (rc != EOK)
    141                 goto error;
     141        rc = ds_display_load_cfg(disp, cfg_file_path);
     142        if (rc != EOK) {
     143                log_msg(LOG_DEFAULT, LVL_NOTE,
     144                    "Starting with fresh configuration.");
     145
     146                /* Create first seat */
     147                rc = ds_seat_create(disp, "Alice", &seat);
     148                if (rc != EOK)
     149                        goto error;
     150        }
    142151
    143152        rc = ds_output_create(&output);
Note: See TracChangeset for help on using the changeset viewer.