From 8a313c74dbf550cb4395e17d27840f8c97b86eb9 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Mon, 19 Oct 2009 21:11:38 +0200 Subject: [PATCH] Log syntax error in command line --- src/ppartsel.c | 4 +--- src/testdisk.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ppartsel.c b/src/ppartsel.c index 914d365a..494b0da8 100644 --- a/src/ppartsel.c +++ b/src/ppartsel.c @@ -293,9 +293,7 @@ void menu_photorec(disk_t *disk_car, const int verbose, const char *recup_dir, f } else { - log_critical("error >%s<\n",*current_cmd); - while(*current_cmd[0]!='\0') - (*current_cmd)++; + log_critical("Syntax error in command line: %s\n",*current_cmd); part_free_list(list_part); return; } diff --git a/src/testdisk.c b/src/testdisk.c index 23335c5d..125703b6 100644 --- a/src/testdisk.c +++ b/src/testdisk.c @@ -410,8 +410,8 @@ int main( int argc, char **argv ) } else if(cmd_run[0]!='\0') { - log_critical("error in command line: %s\n",cmd_run); - printf("error in command line: %s\n",cmd_run); + log_critical("Syntax error in command line: %s\n",cmd_run); + printf("Syntax error in command line: %s\n",cmd_run); } } switch(command)