Changes in uspace/app/vol/vol.c [4285f384:b82985e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/vol/vol.c
r4285f384 rb82985e 1 1 /* 2 * Copyright (c) 20 25Jiri Svoboda2 * Copyright (c) 2017 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 36 36 #include <io/table.h> 37 37 #include <loc.h> 38 #include <stdbool.h>39 38 #include <stdio.h> 40 39 #include <stdlib.h> … … 108 107 } 109 108 110 static errno_t vol_cmd_eject(const char *volspec , bool physical)109 static errno_t vol_cmd_eject(const char *volspec) 111 110 { 112 111 vol_t *vol = NULL; … … 126 125 } 127 126 128 rc = vol_part_eject(vol, part_id, physical ? vef_physical : 129 vef_none); 127 rc = vol_part_eject(vol, part_id); 130 128 if (rc != EOK) { 131 129 printf("Error ejecting volume.\n"); … … 325 323 { 326 324 printf("Syntax:\n"); 327 printf(" %s List present volumes\n", NAME); 328 printf(" %s -c List volume configuration entries\n", NAME); 329 printf(" %s -h Print help\n", NAME); 330 printf(" %s eject [-s] <mp> Eject volume mounted in a directory\n", NAME); 331 printf(" -s to eject physically\n"); 332 printf(" %s insert <svc> Insert volume based on service identifier\n", NAME); 333 printf(" %s insert -p <mp> Insert volume based on filesystem path\n", NAME); 325 printf(" %s List present volumes\n", NAME); 326 printf(" %s -c List volume configuration entries\n", NAME); 327 printf(" %s -h Print help\n", NAME); 328 printf(" %s eject <mp> Eject volume mounted in a directory\n", NAME); 329 printf(" %s insert <svc> Insert volume based on service identifier\n", NAME); 330 printf(" %s insert -p <mp> Insert volume based on filesystem path\n", NAME); 334 331 } 335 332 … … 339 336 char *volspec; 340 337 vol_cmd_t vcmd; 341 bool physical = false;342 338 int i; 343 339 errno_t rc = EINVAL; … … 355 351 } else if (str_cmp(cmd, "eject") == 0) { 356 352 vcmd = vcmd_eject; 357 if (str_cmp(argv[i], "-s") == 0) {358 physical = true;359 ++i;360 }361 362 353 if (argc <= i) { 363 354 printf("Parameter missing.\n"); … … 391 382 switch (vcmd) { 392 383 case vcmd_eject: 393 rc = vol_cmd_eject(volspec , physical);384 rc = vol_cmd_eject(volspec); 394 385 break; 395 386 case vcmd_insert:
Note:
See TracChangeset
for help on using the changeset viewer.