summaryrefslogtreecommitdiffstats
path: root/src/intrface.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:29:28 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:29:28 +0100
commit09ecae700f224a23cfd8f63f98cebeccbe768cc0 (patch)
tree83fbfb551cc9330a02dfb6762e2c4b8e6015eecb /src/intrface.c
parent331f0ef77e62140d0ee9252c33b23b383aa73084 (diff)
Use new functions check_command(), skip_comma_in_command() and get_int_from_command() to parse command line arguments
Diffstat (limited to 'src/intrface.c')
-rw-r--r--src/intrface.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intrface.c b/src/intrface.c
index 25ca3a8..12b3ab5 100644
--- a/src/intrface.c
+++ b/src/intrface.c
@@ -80,11 +80,9 @@ void interface_list(disk_t *disk, const int verbose, const int saveheader, const
static list_part_t *ask_structure_cli(disk_t *disk_car,list_part_t *list_part, const int verbose, char **current_cmd)
{
const list_part_t *pos=list_part;
- while(*current_cmd[0]==',')
- (*current_cmd)++;
- if(strncmp(*current_cmd,"list",4)==0)
+ skip_comma_in_command(current_cmd);
+ if(check_command(current_cmd,"list",4)==0)
{
- (*current_cmd)+=4;
if(pos!=NULL)
{
const partition_t *partition=pos->part;