projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Debian patch 2.5.0-1
[debian/amanda]
/
client-src
/
calcsize.c
diff --git
a/client-src/calcsize.c
b/client-src/calcsize.c
index 5ca13fac43c094136d0aefc89eb24813bfbf43ed..d795f616d9df937397b75ba3b0515aa270a108ba 100644
(file)
--- a/
client-src/calcsize.c
+++ b/
client-src/calcsize.c
@@
-24,7
+24,7
@@
* file named AUTHORS, in the root directory of this distribution.
*/
/*
* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: calcsize.c,v 1.
24.2.3.6.1.2.5 2005/09/20 21:31:52 jrjackson
Exp $
+ * $Id: calcsize.c,v 1.
36 2006/03/09 16:51:41 martinea
Exp $
*
* traverse directory tree to get backup size estimates
*/
*
* traverse directory tree to get backup size estimates
*/
@@
-113,6
+113,9
@@
char **argv;
set_pname("calcsize");
set_pname("calcsize");
+ /* Don't die when child closes pipe */
+ signal(SIGPIPE, SIG_IGN);
+
if (argc < 2) {
fprintf(stderr,"Usage: %s file[s]\n",argv[0]);
return 1;
if (argc < 2) {
fprintf(stderr,"Usage: %s file[s]\n",argv[0]);
return 1;
@@
-295,8
+298,10
@@
char **argv;
* =========================================================================
*/
* =========================================================================
*/
-#ifndef HAVE_BASENAME
-char *basename(file)
+#if !defined(HAVE_BASENAME) && defined(BUILTIN_EXCLUDE_SUPPORT)
+static char *basename P((char *));
+
+static char *basename(file)
char *file;
{
char *cp;
char *file;
{
char *cp;
@@
-325,9
+330,11
@@
char *include;
int parent_len;
int has_exclude = !is_empty_sl(exclude_sl) && use_gtar_excl;
int parent_len;
int has_exclude = !is_empty_sl(exclude_sl) && use_gtar_excl;
+ if(parent_dir == NULL || include == NULL) return;
+
char *aparent = vstralloc(parent_dir, "/", include, NULL);
char *aparent = vstralloc(parent_dir, "/", include, NULL);
- if(
parent_dir &&
stat(parent_dir, &finfo) != -1)
+ if(stat(parent_dir, &finfo) != -1)
parent_dev = finfo.st_dev;
parent_len = strlen(parent_dir);
parent_dev = finfo.st_dev;
parent_len = strlen(parent_dir);
@@
-365,9
+372,8
@@
char *include;
continue;
}
continue;
}
- if(finfo.st_dev != parent_dev)
{
+ if(finfo.st_dev != parent_dev)
continue;
continue;
- }
#ifdef S_IFLNK
is_symlink = ((finfo.st_mode & S_IFMT) == S_IFLNK);
#ifdef S_IFLNK
is_symlink = ((finfo.st_mode & S_IFMT) == S_IFLNK);