diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-07-09 15:24:40 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-02-19 18:22:26 +0100 |
commit | 50d069637d9a95c5728069600f9cd9e945725a42 (patch) | |
tree | f3cda200f47e16fb4a4b3a29645de804e8c18372 /source3/client | |
parent | 60eec86ceb08814dabb986219f756d1645efb82c (diff) | |
download | samba-50d069637d9a95c5728069600f9cd9e945725a42.tar.gz samba-50d069637d9a95c5728069600f9cd9e945725a42.tar.xz samba-50d069637d9a95c5728069600f9cd9e945725a42.zip |
client.c, clitar.c: rename process_tar to tar_process, prepare code
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 3 | ||||
-rw-r--r-- | source3/client/clitar.c | 21 | ||||
-rw-r--r-- | source3/client/clitar_proto.h | 2 |
3 files changed, 18 insertions, 8 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index b74ec73370e..fa3f95f090d 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -5318,6 +5318,7 @@ static int do_host_query(const char *query_host) static int do_tar_op(const char *base_directory) { + extern struct tar tar_ctx; int ret; /* do we already have a connection? */ @@ -5344,7 +5345,7 @@ static int do_tar_op(const char *base_directory) } } - ret=process_tar(); + ret = tar_process(&tar_ctx); cli_shutdown(cli); diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 83b4a96fc5e..5f15f867406 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -415,13 +415,22 @@ int cmd_tar(void) return 0; } -/**************************************************************************** -Command line (option) version -***************************************************************************/ - -int process_tar(void) +int tar_process(struct tar *t) { - return 0; + int rc = 0; + + switch(t->mode.operation) { + case TAR_EXTRACT: + /* tar_extract(t); */ + break; + case TAR_CREATE: + /* tar_create(t); */ + break; + default: + DEBUG(0, ("Invalid tar state\n")); + rc = 1; + } + return rc; } /** diff --git a/source3/client/clitar_proto.h b/source3/client/clitar_proto.h index 1069070362e..3b2671a93e9 100644 --- a/source3/client/clitar_proto.h +++ b/source3/client/clitar_proto.h @@ -26,7 +26,7 @@ int cmd_block(void); int cmd_tarmode(void); int cmd_setmode(void); int cmd_tar(void); -int process_tar(void); +int tar_process(struct tar* tar); int tar_parse_args(struct tar *tar, const char *flag, const char **val, int valsize); bool tar_to_process(struct tar *tar); |