Changeset b598460a in mainline for uspace/app/fdisk/fdisk.c
- Timestamp:
- 2015-10-21T09:27:06Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 852664b9
- Parents:
- 68b5dd11
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fdisk/fdisk.c
r68b5dd11 rb598460a 338 338 fdisk_part_spec_t pspec; 339 339 fdisk_cap_t cap; 340 fdisk_cap_t mcap; 340 341 vol_fstype_t fstype = 0; 341 342 tinput_t *tinput = NULL; 343 fdisk_spc_t spc; 342 344 char *scap; 345 char *smcap = NULL; 346 347 if (pkind == lpk_logical) 348 spc = spc_log; 349 else 350 spc = spc_pri; 351 352 rc = fdisk_part_get_max_avail(dev, spc, &mcap); 353 if (rc != EOK) { 354 rc = EIO; 355 goto error; 356 } 357 358 rc = fdisk_cap_format(&mcap, &smcap); 359 if (rc != EOK) { 360 rc = ENOMEM; 361 goto error; 362 } 343 363 344 364 tinput = tinput_new(); … … 354 374 while (true) { 355 375 printf("Enter capacity of new partition.\n"); 356 rc = tinput_read (tinput, &scap);376 rc = tinput_read_i(tinput, smcap, &scap); 357 377 if (rc != EOK) 358 378 goto error; … … 365 385 tinput_destroy(tinput); 366 386 tinput = NULL; 387 free(smcap); 388 smcap = NULL; 367 389 368 390 if (pkind != lpk_extended) { … … 385 407 return EOK; 386 408 error: 409 free(smcap); 387 410 if (tinput != NULL) 388 411 tinput_destroy(tinput);
Note:
See TracChangeset
for help on using the changeset viewer.