Changes in uspace/lib/c/generic/cap.c [b7fd2a0:05b59393] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/cap.c
rb7fd2a0 r05b59393 81 81 * and @c cv_max gives the maximum value. 82 82 */ 83 errno_t cap_to_blocks(cap_spec_t *cap, cap_vsel_t cvsel, size_t block_size,83 int cap_to_blocks(cap_spec_t *cap, cap_vsel_t cvsel, size_t block_size, 84 84 uint64_t *rblocks) 85 85 { … … 90 90 uint64_t blocks; 91 91 uint64_t rem; 92 errno_t rc;92 int rc; 93 93 94 94 exp = cap->cunit * 3 - cap->dp; … … 144 144 unsigned sdig; 145 145 unsigned rdig; 146 errno_t rc;146 int rc; 147 147 148 148 /* Change units so that we have at most @c scap_max_idig integer digits */ … … 175 175 } 176 176 177 errno_t cap_format(cap_spec_t *cap, char **rstr) 178 { 179 errno_t rc; 180 int ret; 177 int cap_format(cap_spec_t *cap, char **rstr) 178 { 179 int rc; 181 180 const char *sunit; 182 181 uint64_t ipart; … … 197 196 sunit = cu_str[cap->cunit]; 198 197 if (cap->dp > 0) { 199 r et= asprintf(rstr, "%" PRIu64 ".%0*" PRIu64 " %s", ipart,198 rc = asprintf(rstr, "%" PRIu64 ".%0*" PRIu64 " %s", ipart, 200 199 (int)cap->dp, fpart, sunit); 201 200 } else { 202 r et= asprintf(rstr, "%" PRIu64 " %s", ipart, sunit);203 } 204 if (r et< 0)201 rc = asprintf(rstr, "%" PRIu64 " %s", ipart, sunit); 202 } 203 if (rc < 0) 205 204 return ENOMEM; 206 205 … … 208 207 } 209 208 210 static errno_t cap_digit_val(char c, int *val)209 static int cap_digit_val(char c, int *val) 211 210 { 212 211 switch (c) { … … 228 227 } 229 228 230 errno_t cap_parse(const char *str, cap_spec_t *cap)229 int cap_parse(const char *str, cap_spec_t *cap) 231 230 { 232 231 const char *eptr;
Note:
See TracChangeset
for help on using the changeset viewer.