From 1b7a31bd65d4e6bf5e337d6280e3d5319d460bef Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Thu, 3 Jul 2014 15:09:22 -0500 Subject: Track backup and restore progress Track backup and restore progress based on the sizes of the files as they are being added to the tar backup file. Update the progress bar based on the sizes of the files. Change-Id: Idf649efa1db3e91830b4b2add86203a3f30042ff --- libtar/libtar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libtar/libtar.h') diff --git a/libtar/libtar.h b/libtar/libtar.h index 91523d043..e3154ae90 100644 --- a/libtar/libtar.h +++ b/libtar/libtar.h @@ -226,7 +226,7 @@ void th_finish(TAR *t); /***** extract.c ***********************************************************/ /* sequentially extract next file from t */ -int tar_extract_file(TAR *t, char *realname, char *prefix); +int tar_extract_file(TAR *t, char *realname, char *prefix, const int *progress_fd); /* extract different file types */ int tar_extract_dir(TAR *t, char *realname); @@ -237,7 +237,7 @@ int tar_extract_blockdev(TAR *t, char *realname); int tar_extract_fifo(TAR *t, char *realname); /* for regfiles, we need to extract the content blocks as well */ -int tar_extract_regfile(TAR *t, char *realname); +int tar_extract_regfile(TAR *t, char *realname, const int *progress_fd); int tar_skip_regfile(TAR *t); @@ -294,7 +294,7 @@ void int_to_oct_nonull(int num, char *oct, size_t octlen); /* extract groups of files */ int tar_extract_glob(TAR *t, char *globname, char *prefix); -int tar_extract_all(TAR *t, char *prefix); +int tar_extract_all(TAR *t, char *prefix, const int *progress_fd); /* add a whole tree of files */ int tar_append_tree(TAR *t, char *realdir, char *savedir, char *exclude); -- cgit v1.2.3