From fb0c5fc6f5dd4f2fffbba1fec97b54a1401bba0d Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 8 Feb 2008 14:59:13 +0000 Subject: [PATCH] Fix plugin backup/restore sizes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6379 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/ua_dotcmds.c | 2 +- bacula/src/dird/ua_tree.c | 6 +++--- bacula/src/lib/attr.c | 2 +- bacula/src/lib/util.c | 2 +- bacula/src/plugins/fd/bpipe-fd.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index 1b1368b792..ced146c49a 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2002-2007 Free Software Foundation Europe e.V. + Copyright (C) 2002-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. diff --git a/bacula/src/dird/ua_tree.c b/bacula/src/dird/ua_tree.c index 616c052dc7..b6ae6b8dda 100644 --- a/bacula/src/dird/ua_tree.c +++ b/bacula/src/dird/ua_tree.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2002-2007 Free Software Foundation Europe e.V. + Copyright (C) 2002-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -514,7 +514,7 @@ static void ls_output(guid_list *guid, char *buf, const char *fname, const char guid->uid_to_name(statp->st_uid, en1, sizeof(en1)), guid->gid_to_name(statp->st_gid, en2, sizeof(en2))); p += n; - n = sprintf(p, "%s,", edit_uint64(statp->st_size, ec1)); + n = sprintf(p, "%s,", edit_int64(statp->st_size, ec1)); p += n; p = encode_time(statp->st_mtime, p); *p++ = ','; @@ -527,7 +527,7 @@ static void ls_output(guid_list *guid, char *buf, const char *fname, const char guid->uid_to_name(statp->st_uid, en1, sizeof(en1)), guid->gid_to_name(statp->st_gid, en2, sizeof(en2))); p += n; - n = sprintf(p, "%10.10s ", edit_uint64(statp->st_size, ec1)); + n = sprintf(p, "%10.10s ", edit_int64(statp->st_size, ec1)); p += n; if (statp->st_ctime > statp->st_mtime) { time = statp->st_ctime; diff --git a/bacula/src/lib/attr.c b/bacula/src/lib/attr.c index b916f801f5..7057c2f349 100644 --- a/bacula/src/lib/attr.c +++ b/bacula/src/lib/attr.c @@ -251,7 +251,7 @@ void print_ls_output(JCR *jcr, ATTR *attr) p += sprintf(p, "%-8.8s %-8.8s", guid->uid_to_name(attr->statp.st_uid, en1, sizeof(en1)), guid->gid_to_name(attr->statp.st_gid, en2, sizeof(en2))); - p += sprintf(p, "%10.10s ", edit_uint64(attr->statp.st_size, ec1)); + p += sprintf(p, "%10.10s ", edit_int64(attr->statp.st_size, ec1)); p = encode_time(attr->statp.st_ctime, p); *p++ = ' '; *p++ = ' '; diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index eb13ddcbdf..37bfadfaea 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. diff --git a/bacula/src/plugins/fd/bpipe-fd.c b/bacula/src/plugins/fd/bpipe-fd.c index f4b257fa16..75fcda85a0 100644 --- a/bacula/src/plugins/fd/bpipe-fd.c +++ b/bacula/src/plugins/fd/bpipe-fd.c @@ -189,7 +189,7 @@ static bRC startPluginBackup(bpContext *ctx, struct save_pkt *sp) sp->statp.st_ctime = now; sp->statp.st_mtime = now; sp->statp.st_atime = now; - sp->statp.st_size = 100; + sp->statp.st_size = -1; sp->statp.st_blksize = 4096; sp->statp.st_blocks = 1; printf("bpipe: st_size=%p st_blocks=%p sp=%p\n", &sp->statp.st_size, &sp->statp.st_blocks, -- 2.39.5