Changeset 04e520e in mainline
- Timestamp:
- 2024-07-24T10:33:58Z (4 months ago)
- Branches:
- master
- Children:
- 3d2d455b, 53bff11, ddfe233
- Parents:
- 145d4e2e
- git-author:
- Jiri Svoboda <jiri@…> (2024-07-23 17:33:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2024-07-24 10:33:58)
- Location:
- uspace
- Files:
-
- 2 added
- 7 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r145d4e2e r04e520e 1 1 /* 2 * Copyright (c) 2024 Jiri Svoboda 2 3 * Copyright (c) 2005 Martin Decky 3 4 * All rights reserved. … … 35 36 36 37 #include <fibril.h> 38 #include <futil.h> 37 39 #include <stdio.h> 38 40 #include <stdarg.h> … … 351 353 vol_info_t vinfo; 352 354 volume_id_t *volume_ids = NULL; 355 service_id_t *part_ids = NULL; 356 vol_part_info_t pinfo; 353 357 size_t nvols; 358 size_t nparts; 359 bool sv_mounted; 354 360 size_t i; 355 361 errno_t rc; … … 385 391 } 386 392 387 vol_destroy(vol);388 393 free(volume_ids); 394 volume_ids = NULL; 389 395 390 396 if (!found_cfg) { … … 397 403 printf("%s: Error creating directory '%s'.\n", 398 404 NAME, *cp); 399 return rc;405 goto error; 400 406 } 401 407 402 408 ++cp; 403 409 } 410 411 /* Copy initial configuration files */ 412 rc = futil_rcopy_contents("/cfg", "/w/cfg"); 413 if (rc != EOK) 414 goto error; 404 415 } else { 405 416 printf("%s: System volume is configured.\n", NAME); 406 } 407 417 418 /* Wait until system volume is mounted */ 419 sv_mounted = false; 420 421 while (true) { 422 rc = vol_get_parts(vol, &part_ids, &nparts); 423 if (rc != EOK) { 424 printf("Error getting list of volumes.\n"); 425 goto error; 426 } 427 428 for (i = 0; i < nparts; i++) { 429 rc = vol_part_info(vol, part_ids[i], &pinfo); 430 if (rc != EOK) { 431 printf("Error getting partition " 432 "information.\n"); 433 rc = EIO; 434 goto error; 435 } 436 437 if (str_cmp(pinfo.cur_mp, "/w") == 0) { 438 sv_mounted = true; 439 break; 440 } 441 } 442 443 if (sv_mounted) 444 break; 445 446 free(part_ids); 447 part_ids = NULL; 448 449 fibril_sleep(1); 450 printf("Sleeping(1) for system volume.\n"); 451 } 452 } 453 454 vol_destroy(vol); 408 455 return EOK; 409 456 error: … … 411 458 if (volume_ids != NULL) 412 459 free(volume_ids); 460 if (part_ids != NULL) 461 free(part_ids); 413 462 414 463 return rc; -
uspace/app/init/meson.build
r145d4e2e r04e520e 28 28 # 29 29 30 deps = [ ' untar', 'block' ]30 deps = [ 'block', 'futil', 'untar' ] 31 31 link_args += '-static' 32 32 src = files('init.c', 'untar.c') -
uspace/app/sysinst/meson.build
r145d4e2e r04e520e 27 27 # 28 28 29 deps = [ 'block', 'fdisk', ' sif' ]29 deps = [ 'block', 'fdisk', 'futil', 'sif' ] 30 30 src = files( 31 'futil.c',32 31 'rdimg.c', 33 32 'sysinst.c', -
uspace/app/sysinst/sysinst.c
r145d4e2e r04e520e 41 41 #include <errno.h> 42 42 #include <fdisk.h> 43 #include <futil.h> 43 44 #include <loc.h> 44 45 #include <stdio.h> … … 49 50 #include <vol.h> 50 51 51 #include "futil.h"52 52 #include "grub.h" 53 53 #include "rdimg.h" … … 80 80 #define BOOT_BLOCK_IDX 0 /* MBR */ 81 81 82 #define CFG_FILES_SRC "/cfg" 83 #define CFG_FILES_DEST MOUNT_POINT "/cfg" 84 82 85 static const char *default_devs[] = { 83 86 DEFAULT_DEV_0, … … 226 229 free(path); 227 230 path = NULL; 231 232 /* Copy initial configuration files */ 233 rc = futil_rcopy_contents(CFG_FILES_SRC, CFG_FILES_DEST); 234 if (rc != EOK) 235 return rc; 228 236 229 237 return EOK; -
uspace/app/taskbar-cfg/main.c
r145d4e2e r04e520e 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 77 77 return 1; 78 78 79 rc = taskbar_cfg_open(tbcfg, "/ cfg/taskbar.sif");79 rc = taskbar_cfg_open(tbcfg, "/w/cfg/taskbar.sif"); 80 80 if (rc != EOK) 81 81 return 1; -
uspace/app/taskbar/taskbar.c
r145d4e2e r04e520e 48 48 #include "wndlist.h" 49 49 50 #define TASKBAR_CONFIG_FILE "/ cfg/taskbar.sif"50 #define TASKBAR_CONFIG_FILE "/w/cfg/taskbar.sif" 51 51 52 52 static void taskbar_wnd_close(ui_window_t *, void *); -
uspace/lib/futil/include/futil.h
r145d4e2e r04e520e 1 1 /* 2 * Copyright (c) 20 14 Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup sysinst29 /** @addtogroup futil 30 30 * @{ 31 31 */ … … 38 38 #define FUTIL_H 39 39 40 #include <ipc/loc.h>41 40 #include <stddef.h> 42 41 -
uspace/lib/futil/src/futil.c
r145d4e2e r04e520e 1 1 /* 2 * Copyright (c) 20 14 Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup sysinst29 /** @addtogroup futil 30 30 * @{ 31 31 */ 32 /** @file File manipulation utility functions for installer32 /** @file File manipulation utility functions 33 33 */ 34 34 -
uspace/lib/meson.build
r145d4e2e r04e520e 74 74 'fmtutil', 75 75 'fs', 76 'futil', 76 77 'gfx', 77 78 'http',
Note:
See TracChangeset
for help on using the changeset viewer.