Changes in uspace/app/vol/vol.c [4285f384:b82985e] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/vol/vol.c

    r4285f384 rb82985e  
    11/*
    2  * Copyright (c) 2025 Jiri Svoboda
     2 * Copyright (c) 2017 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3636#include <io/table.h>
    3737#include <loc.h>
    38 #include <stdbool.h>
    3938#include <stdio.h>
    4039#include <stdlib.h>
     
    108107}
    109108
    110 static errno_t vol_cmd_eject(const char *volspec, bool physical)
     109static errno_t vol_cmd_eject(const char *volspec)
    111110{
    112111        vol_t *vol = NULL;
     
    126125        }
    127126
    128         rc = vol_part_eject(vol, part_id, physical ? vef_physical :
    129             vef_none);
     127        rc = vol_part_eject(vol, part_id);
    130128        if (rc != EOK) {
    131129                printf("Error ejecting volume.\n");
     
    325323{
    326324        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);
    334331}
    335332
     
    339336        char *volspec;
    340337        vol_cmd_t vcmd;
    341         bool physical = false;
    342338        int i;
    343339        errno_t rc = EINVAL;
     
    355351                } else if (str_cmp(cmd, "eject") == 0) {
    356352                        vcmd = vcmd_eject;
    357                         if (str_cmp(argv[i], "-s") == 0) {
    358                                 physical = true;
    359                                 ++i;
    360                         }
    361 
    362353                        if (argc <= i) {
    363354                                printf("Parameter missing.\n");
     
    391382        switch (vcmd) {
    392383        case vcmd_eject:
    393                 rc = vol_cmd_eject(volspec, physical);
     384                rc = vol_cmd_eject(volspec);
    394385                break;
    395386        case vcmd_insert:
Note: See TracChangeset for help on using the changeset viewer.