Changeset 64ffd83 in mainline for uspace/app/fdisk/fdisk.c
- Timestamp:
- 2018-07-24T09:43:38Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bec18a9
- Parents:
- 05208d9
- git-author:
- Jiri Svoboda <jiri@…> (2018-07-23 18:41:45)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-07-24 09:43:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fdisk/fdisk.c
r05208d9 r64ffd83 1 1 /* 2 * Copyright (c) 201 5Jiri Svoboda2 * Copyright (c) 2018 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 432 432 char *smcap = NULL; 433 433 char *label = NULL; 434 char *mountp = NULL; 434 435 435 436 if (pkind == lpk_logical) … … 506 507 } 507 508 509 /* Ask for mount point */ 510 tinput = tinput_new(); 511 if (tinput == NULL) { 512 rc = ENOMEM; 513 goto error; 514 } 515 516 rc = tinput_set_prompt(tinput, "?> "); 517 if (rc != EOK) 518 goto error; 519 520 while (true) { 521 printf("Enter mount point for new partition (Auto, None or /path).\n"); 522 rc = tinput_read_i(tinput, "Auto", &mountp); 523 if (rc != EOK) 524 goto error; 525 526 rc = vol_mountp_validate(mountp); 527 if (rc == EOK) 528 break; 529 530 free(mountp); 531 mountp = NULL; 532 } 533 534 tinput_destroy(tinput); 535 tinput = NULL; 536 508 537 fdisk_pspec_init(&pspec); 509 538 pspec.capacity = cap; … … 511 540 pspec.fstype = fstype; 512 541 pspec.label = label; 542 pspec.mountp = mountp; 513 543 514 544 rc = fdisk_part_create(dev, &pspec, NULL); … … 519 549 520 550 free(label); 551 free(mountp); 521 552 return EOK; 522 553 error: 523 554 free(smcap); 524 555 free(label); 556 free(mountp); 525 557 if (tinput != NULL) 526 558 tinput_destroy(tinput);
Note:
See TracChangeset
for help on using the changeset viewer.