Changeset d3b2ffa in mainline for uspace/lib/fdisk/src/fdisk.c
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fdisk/src/fdisk.c
r1e472ee rd3b2ffa 813 813 } 814 814 815 errno_t fdisk_ltype_format(label_type_t ltype, char **rstr)816 {817 const char *sltype;818 char *s;819 820 sltype = NULL;821 switch (ltype) {822 case lt_none:823 sltype = "None";824 break;825 case lt_mbr:826 sltype = "MBR";827 break;828 case lt_gpt:829 sltype = "GPT";830 break;831 }832 833 s = str_dup(sltype);834 if (s == NULL)835 return ENOMEM;836 837 *rstr = s;838 return EOK;839 }840 841 errno_t fdisk_fstype_format(vol_fstype_t fstype, char **rstr)842 {843 const char *sfstype;844 char *s;845 846 sfstype = NULL;847 switch (fstype) {848 case fs_exfat:849 sfstype = "ExFAT";850 break;851 case fs_fat:852 sfstype = "FAT";853 break;854 case fs_minix:855 sfstype = "MINIX";856 break;857 case fs_ext4:858 sfstype = "Ext4";859 break;860 case fs_cdfs:861 sfstype = "ISO 9660";862 break;863 }864 865 s = str_dup(sfstype);866 if (s == NULL)867 return ENOMEM;868 869 *rstr = s;870 return EOK;871 }872 873 errno_t fdisk_pkind_format(label_pkind_t pkind, char **rstr)874 {875 const char *spkind;876 char *s;877 878 spkind = NULL;879 switch (pkind) {880 case lpk_primary:881 spkind = "Primary";882 break;883 case lpk_extended:884 spkind = "Extended";885 break;886 case lpk_logical:887 spkind = "Logical";888 break;889 }890 891 s = str_dup(spkind);892 if (s == NULL)893 return ENOMEM;894 895 *rstr = s;896 return EOK;897 }898 899 815 /** Get free partition index. */ 900 816 static errno_t fdisk_part_get_free_idx(fdisk_dev_t *dev, int *rindex)
Note:
See TracChangeset
for help on using the changeset viewer.