Changeset d3b2ffa in mainline for uspace/app
- Timestamp:
- 2018-06-29T15:40:10Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5e904dd
- Parents:
- 1e472ee (diff), 1a9174e (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. - Location:
- uspace/app
- Files:
-
- 2 added
- 2 edited
-
fdisk/fdisk.c (modified) (9 diffs)
-
sysinst/sysinst.c (modified) (2 diffs)
-
vol/Makefile (added)
-
vol/vol.c (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fdisk/fdisk.c
r1e472ee rd3b2ffa 37 37 #include <cap.h> 38 38 #include <errno.h> 39 #include <fdisk.h> 40 #include <io/label.h> 39 41 #include <nchoice.h> 40 42 #include <stdbool.h> 41 43 #include <stdio.h> 42 44 #include <stdlib.h> 43 #include <fdisk.h>44 45 #include <str.h> 46 #include <vol.h> 45 47 46 48 #define NO_LABEL_CAPTION "(No name)" … … 69 71 } devac_t; 70 72 71 static errno_t fdsk_pcnt_fs_format(vol_part_cnt_t pcnt, vol_fstype_t fstype,72 char **rstr)73 {74 errno_t rc;75 char *s;76 77 switch (pcnt) {78 case vpc_empty:79 s = str_dup("Empty");80 if (s == NULL)81 return ENOMEM;82 break;83 case vpc_fs:84 rc = fdisk_fstype_format(fstype, &s);85 if (rc != EOK)86 return ENOMEM;87 break;88 case vpc_unknown:89 s = str_dup("Unknown");90 if (s == NULL)91 return ENOMEM;92 break;93 }94 95 *rstr = s;96 return EOK;97 }98 99 73 /** Confirm user selection. */ 100 74 static errno_t fdsk_confirm(const char *msg, bool *rconfirm) … … 305 279 306 280 for (i = LT_FIRST; i < LT_LIMIT; i++) { 307 rc = fdisk_ltype_format(i, &sltype);281 rc = label_type_format(i, &sltype); 308 282 if (rc != EOK) 309 283 goto error; … … 413 387 414 388 for (i = 0; i < VOL_FSTYPE_LIMIT; i++) { 415 rc = fdisk_fstype_format(i, &sfstype);389 rc = vol_fstype_format(i, &sfstype); 416 390 if (rc != EOK) 417 391 goto error; … … 598 572 } 599 573 600 rc = fdisk_pkind_format(pinfo.pkind, &spkind);574 rc = label_pkind_format(pinfo.pkind, &spkind); 601 575 if (rc != EOK) { 602 576 printf("\nOut of memory.\n"); … … 605 579 606 580 if (pinfo.pkind != lpk_extended) { 607 rc = fdsk_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype);581 rc = vol_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype); 608 582 if (rc != EOK) { 609 583 printf("Out of memory.\n"); … … 773 747 break; 774 748 default: 775 rc = fdisk_ltype_format(linfo.ltype, &sltype);749 rc = label_type_format(linfo.ltype, &sltype); 776 750 if (rc != EOK) { 777 751 assert(rc == ENOMEM); … … 804 778 } 805 779 806 rc = fdsk_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype);780 rc = vol_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype); 807 781 if (rc != EOK) { 808 782 printf("Out of memory.\n"); … … 821 795 822 796 if ((linfo.flags & lf_ext_supp) != 0) { 823 rc = fdisk_pkind_format(pinfo.pkind, &spkind);797 rc = label_pkind_format(pinfo.pkind, &spkind); 824 798 if (rc != EOK) { 825 799 printf("\nOut of memory.\n"); -
uspace/app/sysinst/sysinst.c
r1e472ee rd3b2ffa 69 69 #define MOUNT_POINT "/inst" 70 70 71 /** Device containing HelenOS live CD */ 72 #define CD_DEV "devices/\\hw\\pci0\\00:01.0\\ata-c2\\d0" 73 74 #define CD_FS_TYPE "cdfs" 75 #define CD_FS_SRV "/srv/cdfs" 76 #define CD_MOUNT_POINT "/cdrom" 77 78 #define BOOT_FILES_SRC "/cdrom" 71 /** HelenOS live CD volume label */ 72 #define CD_VOL_LABEL "HelenOS-CD" 73 #define CD_MOUNT_POINT "/vol/" CD_VOL_LABEL 74 75 #define BOOT_FILES_SRC CD_MOUNT_POINT 79 76 #define BOOT_BLOCK_IDX 0 /* MBR */ 80 77 … … 196 193 static errno_t sysinst_copy_boot_files(void) 197 194 { 198 task_wait_t twait; 199 task_exit_t texit; 200 errno_t rc; 201 int trc; 202 203 printf("sysinst_copy_boot_files(): start filesystem server\n"); 204 rc = task_spawnl(NULL, &twait, CD_FS_SRV, CD_FS_SRV, NULL); 205 if (rc != EOK) 206 return rc; 207 208 printf("sysinst_copy_boot_files(): wait for filesystem server\n"); 209 rc = task_wait(&twait, &texit, &trc); 210 if (rc != EOK) 211 return rc; 212 213 printf("sysinst_copy_boot_files(): verify filesystem server result\n"); 214 if (texit != TASK_EXIT_NORMAL || trc != 0) { 215 printf("sysinst_fs_mount(): not successful, but could be already loaded.\n"); 216 } 217 218 printf("sysinst_copy_boot_files(): create CD mount point\n"); 219 rc = vfs_link_path(CD_MOUNT_POINT, KIND_DIRECTORY, NULL); 220 if (rc != EOK) 221 return rc; 222 223 printf("sysinst_copy_boot_files(): mount CD filesystem\n"); 224 rc = vfs_mount_path(CD_MOUNT_POINT, CD_FS_TYPE, CD_DEV, "", 0, 0); 225 if (rc != EOK) 226 return rc; 195 errno_t rc; 227 196 228 197 printf("sysinst_copy_boot_files(): copy bootloader files\n");
Note:
See TracChangeset
for help on using the changeset viewer.
