Changeset 2dab624 in mainline
- Timestamp:
- 2015-10-31T20:24:27Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9624c35
- Parents:
- dc2d582
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fdisk/fdisk.c
rdc2d582 r2dab624 65 65 } devac_t; 66 66 67 static int fdsk_pcnt_fs_format(vol_part_cnt_t pcnt, vol_fstype_t fstype, 68 char **rstr) 69 { 70 int rc; 71 char *s; 72 73 switch (pcnt) { 74 case vpc_empty: 75 s = str_dup("Empty"); 76 if (s == NULL) 77 return ENOMEM; 78 break; 79 case vpc_fs: 80 rc = fdisk_fstype_format(fstype, &s); 81 if (rc != EOK) 82 return ENOMEM; 83 break; 84 case vpc_unknown: 85 s = str_dup("Unknown"); 86 if (s == NULL) 87 return ENOMEM; 88 break; 89 } 90 91 *rstr = s; 92 return EOK; 93 } 94 67 95 /** Confirm user selection. */ 68 96 static int fdsk_confirm(const char *msg, bool *rconfirm) … … 538 566 539 567 if (pinfo.pkind != lpk_extended) { 540 rc = fd isk_fstype_format(pinfo.fstype, &sfstype);568 rc = fdsk_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype); 541 569 if (rc != EOK) { 542 570 printf("Out of memory.\n"); … … 730 758 } 731 759 732 rc = fd isk_fstype_format(pinfo.fstype, &sfstype);760 rc = fdsk_pcnt_fs_format(pinfo.pcnt, pinfo.fstype, &sfstype); 733 761 if (rc != EOK) { 734 762 printf("Out of memory.\n"); … … 753 781 754 782 if (pinfo.pkind != lpk_extended) { 755 switch (pinfo.pcnt) { 756 case vpc_empty: 757 printf(", Empty"); 758 break; 759 case vpc_fs: 760 printf(", %s", sfstype); 761 break; 762 case vpc_unknown: 763 printf(", Unknown"); 764 break; 765 } 783 printf(", %s", sfstype); 766 784 } 767 785 -
uspace/lib/fdisk/src/cap.c
rdc2d582 r2dab624 255 255 } 256 256 } else { 257 m = 0;dp = 0;257 dp = 0; 258 258 } 259 259 -
uspace/lib/fdisk/src/fdisk.c
rdc2d582 r2dab624 790 790 return EIO; 791 791 } 792 } 793 794 if (part->svc_id != 0) { 792 795 793 part->pcnt = vpc_fs; 796 794 part->fstype = pspec->fstype; 797 795 } 798 799 part->capacity = pspec->capacity;800 796 801 797 if (rpart != NULL) -
uspace/srv/volsrv/volsrv.c
rdc2d582 r2dab624 226 226 } 227 227 228 part->pcnt = vpc_fs; 229 part->fstype = fstype; 230 228 231 async_answer_0(iid, EOK); 229 232 }
Note:
See TracChangeset
for help on using the changeset viewer.