Changeset 2dab624 in mainline for uspace/app/fdisk/fdisk.c
- 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
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.