summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c16
-rw-r--r--source3/client/clitar.c8
2 files changed, 17 insertions, 7 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index c52815c25b..84ff1b50c8 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -85,7 +85,7 @@ static BOOL call_api(int prcnt,int drcnt,
int *rprcnt,int *rdrcnt,
char *param,char *data,
char **rparam,char **rdata);
-
+static BOOL do_this_one(file_info *finfo);
/* clitar bits insert */
extern int blocksize;
@@ -135,6 +135,8 @@ int get_total_time_ms = 0;
int put_total_size = 0;
int put_total_time_ms = 0;
+/* totals globals */
+int dir_total = 0;
extern int Client;
@@ -473,12 +475,15 @@ static void cmd_cd(char *inbuf,char *outbuf)
****************************************************************************/
static void display_finfo(file_info *finfo)
{
- time_t t = finfo->mtime; /* the time is assumed to be passed as GMT */
- DEBUG(0,(" %-30s%7.7s%10d %s",
- CNV_LANG(finfo->name),
+ if (do_this_one(finfo)) {
+ time_t t = finfo->mtime; /* the time is assumed to be passed as GMT */
+ DEBUG(0,(" %-30s%7.7s%10d %s",
+ CNV_LANG(finfo->name),
attrib_string(finfo->mode),
finfo->size,
asctime(LocalTime(&t))));
+ dir_total += finfo->size;
+ }
}
@@ -1104,6 +1109,7 @@ static void cmd_dir(char *inbuf,char *outbuf)
fstring buf;
char *p=buf;
+ dir_total = 0;
strcpy(mask,cur_dir);
if(mask[strlen(mask)-1]!='\\')
strcat(mask,"\\");
@@ -1122,6 +1128,8 @@ static void cmd_dir(char *inbuf,char *outbuf)
do_dir(inbuf,outbuf,mask,attribute,NULL,recurse);
do_dskattr();
+
+ DEBUG(3, ("Total bytes listed: %d\n", dir_total));
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 951947ecb2..f70e639e90 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -41,7 +41,7 @@ static int attribute = aDIR | aSYSTEM | aHIDDEN;
#endif
static char *tarbuf;
-static int tp, ntarf, tbufsiz;
+static int tp, ntarf, tbufsiz, ttarf;
/* Incremental mode */
BOOL tar_inc=False;
/* Reset archive bit */
@@ -271,8 +271,8 @@ static void initarbuf()
tbufsiz=blocksize*TBLOCK;
tarbuf=malloc(tbufsiz);
- /* reset tar buffer pointer and tar file counter */
- tp=0; ntarf=0;
+ /* reset tar buffer pointer and tar file counter and total dumped */
+ tp=0; ntarf=0; ttarf=0;
}
/****************************************************************************
@@ -1078,6 +1078,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
if (finfo.size % TBLOCK)
dozerobuf(tarhandle, TBLOCK - (finfo.size % TBLOCK));
+ ttarf+=finfo.size + TBLOCK - (finfo.size % TBLOCK);
ntarf++;
}
@@ -1606,6 +1607,7 @@ int process_tar(char *inbuf, char *outbuf)
free(tarbuf);
DEBUG(0, ("tar: dumped %d tar files\n", ntarf));
+ DEBUG(0, ("Total bytes written: %d\n", ttarf));
break;
}