Changeset 84239b1 in mainline for uspace/app/mkexfat/mkexfat.c
- Timestamp:
- 2018-03-11T19:39:11Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3d47c97
- Parents:
- 850fd32
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkexfat/mkexfat.c
r850fd32 r84239b1 680 680 unsigned r; 681 681 682 for (r = 0;n >> r != 1; ++r); 682 r = 0; 683 while (n >> r != 1) 684 ++r; 683 685 684 686 return r; … … 771 773 cfg.label = NULL; 772 774 773 for (c = 0, optind = 0, opt_ind = 0; c != -1;) { 775 c = 0; 776 optind = 0; 777 opt_ind = 0; 778 while (c != -1) { 774 779 c = getopt_long(argc, argv, "hs:c:L:", 775 780 long_options, &opt_ind); … … 845 850 846 851 if (cfg.sector_size > 4096) { 847 printf(NAME ": Error, sector size can't be greater" \852 printf(NAME ": Error, sector size can't be greater" 848 853 " than 4096 bytes.\n"); 849 854 return 2; … … 852 857 rc = block_get_nblocks(service_id, &cfg.volume_count); 853 858 if (rc != EOK) { 854 printf(NAME ": Warning, failed to obtain" \859 printf(NAME ": Warning, failed to obtain" 855 860 " block device size.\n"); 856 861 857 862 if (user_fs_size == 0) { 858 printf(NAME ": You must specify the" \863 printf(NAME ": You must specify the" 859 864 " filesystem size.\n"); 860 865 return 1; … … 897 902 div_round_up(cfg.bitmap_size, cfg.cluster_size)); 898 903 if (rc != EOK) { 899 printf(NAME ": Error, failed to allocate" \904 printf(NAME ": Error, failed to allocate" 900 905 " clusters for bitmap.\n"); 901 906 return 2; … … 910 915 div_round_up(sizeof(upcase_table), cfg.cluster_size)); 911 916 if (rc != EOK) { 912 printf(NAME ":Error, failed to allocate clusters" \917 printf(NAME ":Error, failed to allocate clusters" 913 918 " for the upcase table.\n"); 914 919 return 2; … … 921 926 rc = fat_allocate_clusters(service_id, &cfg, next_cls, 1); 922 927 if (rc != EOK) { 923 printf(NAME ": Error, failed to allocate cluster" \928 printf(NAME ": Error, failed to allocate cluster" 924 929 " for the root dentry.\n"); 925 930 return 2; … … 931 936 rc = bitmap_write(service_id, &cfg); 932 937 if (rc != EOK) { 933 printf(NAME ": Error, failed to write the allocation" \938 printf(NAME ": Error, failed to write the allocation" 934 939 " bitmap to disk.\n"); 935 940 return 2; … … 941 946 rc = upcase_table_write(service_id, &cfg); 942 947 if (rc != EOK) { 943 printf(NAME ": Error, failed to write the" \948 printf(NAME ": Error, failed to write the" 944 949 " upcase table to disk.\n"); 945 950 return 2; … … 950 955 rc = root_dentries_write(service_id, &cfg); 951 956 if (rc != EOK) { 952 printf(NAME ": Error, failed to write the root directory" \957 printf(NAME ": Error, failed to write the root directory" 953 958 " entries to disk.\n"); 954 959 return 2;
Note:
See TracChangeset
for help on using the changeset viewer.