From 363170c432f3c3e34da46abd51ee9bc221806f6f Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Mon, 19 Aug 2019 17:58:35 +0100 Subject: Added help info --- cmd/cmd_blk.c | 6 ++++++ cmd/cmd_cd.c | 6 ++++++ cmd/cmd_close.c | 6 ++++++ cmd/cmd_dump.c | 6 ++++++ cmd/cmd_dumps.c | 6 ++++++ cmd/cmd_dumpx.c | 5 +++++ cmd/cmd_flags.c | 6 ++++++ cmd/cmd_info.c | 6 ++++++ cmd/cmd_ls.c | 6 ++++++ cmd/cmd_open.c | 4 ++++ cmd/cmd_pos.c | 6 ++++++ cmd/cmd_pwd.c | 6 ++++++ cmd/cmd_read.c | 8 +++++++- cmd/cmd_resize.c | 6 ++++++ cmd/cmd_seek.c | 6 ++++++ cmd/cmd_size.c | 6 ++++++ cmd/cmd_write.c | 6 ++++++ cmd/cmd_writes.c | 6 ++++++ 18 files changed, 106 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/cmd_blk.c b/cmd/cmd_blk.c index e497780..07f27f8 100644 --- a/cmd/cmd_blk.c +++ b/cmd/cmd_blk.c @@ -30,4 +30,10 @@ int c_blk( cmd_arg_t *arg ) return -1; } return 0; +} + +int h_blk( cmd_arg_t *arg ) +{ + printf("[SIZE] - set block size"); + return 0; } \ No newline at end of file diff --git a/cmd/cmd_cd.c b/cmd/cmd_cd.c index 652217c..92c22b2 100644 --- a/cmd/cmd_cd.c +++ b/cmd/cmd_cd.c @@ -28,5 +28,11 @@ int c_cd( cmd_arg_t *arg ) return -1; } + return 0; +} + +int h_cd( cmd_arg_t *arg ) +{ + printf("[DIR] - change shell directory"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_close.c b/cmd/cmd_close.c index a789cd0..d5a03b3 100644 --- a/cmd/cmd_close.c +++ b/cmd/cmd_close.c @@ -29,5 +29,11 @@ int c_close( cmd_arg_t *arg ) buf_free( g_buf ); } + return 0; +} + +int h_close( cmd_arg_t *arg ) +{ + printf(" - close current file"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_dump.c b/cmd/cmd_dump.c index a11a2d0..bf2e5d1 100644 --- a/cmd/cmd_dump.c +++ b/cmd/cmd_dump.c @@ -24,5 +24,11 @@ int c_dump( cmd_arg_t *arg ) } printf("\n"); + return 0; +} + +int h_dump( cmd_arg_t *arg ) +{ + printf(" - dump data as hex string"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_dumps.c b/cmd/cmd_dumps.c index 4f3461c..ecc5143 100644 --- a/cmd/cmd_dumps.c +++ b/cmd/cmd_dumps.c @@ -32,5 +32,11 @@ int c_dumps( cmd_arg_t *arg ) } printf("\n"); + return 0; +} + +int h_dumps( cmd_arg_t *arg ) +{ + printf(" - dump data as printable string"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_dumpx.c b/cmd/cmd_dumpx.c index d6228fd..3e6cdf1 100644 --- a/cmd/cmd_dumpx.c +++ b/cmd/cmd_dumpx.c @@ -51,5 +51,10 @@ int c_dumpx( cmd_arg_t *arg ) } printf("\n"); + return 0; +} +int h_dumpx( cmd_arg_t *arg ) +{ + printf(" - dump as formated hex dump"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_flags.c b/cmd/cmd_flags.c index 0c4a8bd..03f6b81 100644 --- a/cmd/cmd_flags.c +++ b/cmd/cmd_flags.c @@ -40,5 +40,11 @@ int c_flags( cmd_arg_t *arg ) return -1; } + return 0; +} + +int h_flags( cmd_arg_t *arg ) +{ + printf(" - show current file flags"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_info.c b/cmd/cmd_info.c index 8744efe..74324f6 100644 --- a/cmd/cmd_info.c +++ b/cmd/cmd_info.c @@ -30,5 +30,11 @@ int c_info( cmd_arg_t *arg ) printf("BLOCK : %u\n", g_file->blk_size ); } + return 0; +} + +int h_info( cmd_arg_t *arg ) +{ + printf(" - show running file info"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_ls.c b/cmd/cmd_ls.c index a3c642e..7e92db6 100644 --- a/cmd/cmd_ls.c +++ b/cmd/cmd_ls.c @@ -37,5 +37,11 @@ int c_ls( cmd_arg_t *arg ) } free( f_ls ); + return 0; +} + +int h_ls( cmd_arg_t *arg ) +{ + printf(" - list files in current directory"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_open.c b/cmd/cmd_open.c index 6ecfa8e..a4740c6 100644 --- a/cmd/cmd_open.c +++ b/cmd/cmd_open.c @@ -19,6 +19,8 @@ int c_open( cmd_arg_t *arg ) char *fname = NULL; int fret = 0; + printf("%s\n",argv[0]); + if ( argc != 1 ) { printf("Neeed one argument %d\n",argc); @@ -27,6 +29,8 @@ int c_open( cmd_arg_t *arg ) fname = argv[0]; + printf("%s\n",fname); + fret = file_open_fn( g_file, fname, g_flags ); //!if failure fields could be non empty inside struct if ( fret < 0 ) { diff --git a/cmd/cmd_pos.c b/cmd/cmd_pos.c index 272ba3f..05264d4 100644 --- a/cmd/cmd_pos.c +++ b/cmd/cmd_pos.c @@ -21,5 +21,11 @@ int c_pos( cmd_arg_t *arg ) printf("POS %d\n",fret); + return 0; +} + +int h_pos( cmd_arg_t *arg ) +{ + printf(" - get position in file"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_pwd.c b/cmd/cmd_pwd.c index f14ece7..4e21721 100644 --- a/cmd/cmd_pwd.c +++ b/cmd/cmd_pwd.c @@ -32,5 +32,11 @@ int c_pwd( cmd_arg_t *arg ) free( cur_dir ); cur_dir = NULL; + return 0; +} + +int h_pwd( cmd_arg_t *arg ) +{ + printf(" - path of current shell running instance"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_read.c b/cmd/cmd_read.c index 1a4aa89..68dab14 100644 --- a/cmd/cmd_read.c +++ b/cmd/cmd_read.c @@ -25,4 +25,10 @@ int c_read( cmd_arg_t *arg ) } return 0; -} \ No newline at end of file +} + +int h_read( cmd_arg_t *arg ) +{ + printf(" - read data from file"); + return 0; +} diff --git a/cmd/cmd_resize.c b/cmd/cmd_resize.c index 532c43c..1e723cf 100644 --- a/cmd/cmd_resize.c +++ b/cmd/cmd_resize.c @@ -36,5 +36,11 @@ int c_resize( cmd_arg_t *arg ) file_resize( g_file, resize ); + return 0; +} + +int h_resize( cmd_arg_t *arg ) +{ + printf("[FILESIZE] - resize current file"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_seek.c b/cmd/cmd_seek.c index fd3dcf5..7516811 100644 --- a/cmd/cmd_seek.c +++ b/cmd/cmd_seek.c @@ -57,5 +57,11 @@ int c_seek( cmd_arg_t *arg ) return -1; } + return 0; +} + +int h_seek( cmd_arg_t *arg ) +{ + printf("[POS] - move to differnt file offset"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_size.c b/cmd/cmd_size.c index 5f27ee1..12723ef 100644 --- a/cmd/cmd_size.c +++ b/cmd/cmd_size.c @@ -21,5 +21,11 @@ int c_size( cmd_arg_t *arg ) printf("File size %zu\n", size); + return 0; +} + +int h_size( cmd_arg_t *arg ) +{ + printf(" - size of current file"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_write.c b/cmd/cmd_write.c index 1d4c1e9..d54c0b5 100644 --- a/cmd/cmd_write.c +++ b/cmd/cmd_write.c @@ -86,5 +86,11 @@ int c_write( cmd_arg_t *arg) return -1; } + return 0; +} + +int h_write( cmd_arg_t *arg ) +{ + printf("[HEXBUF] - hex data writen to buf and back to file"); return 0; } \ No newline at end of file diff --git a/cmd/cmd_writes.c b/cmd/cmd_writes.c index 6b0d472..7d7eeed 100644 --- a/cmd/cmd_writes.c +++ b/cmd/cmd_writes.c @@ -46,3 +46,9 @@ int c_writes( cmd_arg_t *arg ) return 0; } + +int h_writes( cmd_arg_t *arg ) +{ + printf("[STRING] - data written to buffer and file as string"); + return 0; +} -- cgit v1.2.3