Ignore:
File:
1 edited

Legend:

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

    rb1490d2 rad9e225  
    11/*
    2  * Copyright (c) 2025 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * Copyright (c) 2005 Martin Decky
    44 * All rights reserved.
     
    382382                printf("%s: System volume is configured.\n", NAME);
    383383
    384                 /* Verify that system volume is mounted */
     384                /* Wait until system volume is mounted */
    385385                sv_mounted = false;
    386386
    387                 rc = vol_get_parts(vol, &part_ids, &nparts);
    388                 if (rc != EOK) {
    389                         printf("Error getting list of volumes.\n");
    390                         goto error;
    391                 }
    392 
    393                 for (i = 0; i < nparts; i++) {
    394                         rc = vol_part_info(vol, part_ids[i], &pinfo);
     387                while (true) {
     388                        rc = vol_get_parts(vol, &part_ids, &nparts);
    395389                        if (rc != EOK) {
    396                                 printf("Error getting partition "
    397                                     "information.\n");
    398                                 rc = EIO;
     390                                printf("Error getting list of volumes.\n");
    399391                                goto error;
    400392                        }
    401393
    402                         if (str_cmp(pinfo.cur_mp, "/w") == 0) {
    403                                 sv_mounted = true;
     394                        for (i = 0; i < nparts; i++) {
     395                                rc = vol_part_info(vol, part_ids[i], &pinfo);
     396                                if (rc != EOK) {
     397                                        printf("Error getting partition "
     398                                            "information.\n");
     399                                        rc = EIO;
     400                                        goto error;
     401                                }
     402
     403                                if (str_cmp(pinfo.cur_mp, "/w") == 0) {
     404                                        sv_mounted = true;
     405                                        break;
     406                                }
     407                        }
     408
     409                        if (sv_mounted)
    404410                                break;
    405                         }
    406                 }
    407 
    408                 if (sv_mounted == false) {
    409                         printf("System volume not found.\n");
    410                         rc = EIO;
    411                         goto error;
    412                 }
    413 
    414                 free(part_ids);
    415                 part_ids = NULL;
    416 
     411
     412                        free(part_ids);
     413                        part_ids = NULL;
     414
     415                        fibril_sleep(1);
     416                        printf("Sleeping(1) for system volume.\n");
     417                }
    417418        }
    418419
Note: See TracChangeset for help on using the changeset viewer.