faubackup2/src/common backup_control.cpp,1.15,1.16 fileinfo.cpp,1.4,1.5 int_handler.cpp,1.3,1.4 registration.cpp,1.6,1.7 system_calls.cpp,1.7,1.8
Martin Waitz <[email protected]> Tue, 21 Jun 2005 09:16:47 +0000
| Newsgroups | gmane.comp.sysutils.backup.faubackup.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/faubackup/faubackup2/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8992/src/common
Modified Files:
backup_control.cpp fileinfo.cpp int_handler.cpp
registration.cpp system_calls.cpp
Log Message:
more format strings
Index: int_handler.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/int_handler.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** int_handler.cpp 14 Jun 2005 20:23:33 -0000 1.3
--- int_handler.cpp 21 Jun 2005 09:16:45 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
#include <sys/types.h>
#include <sys/wait.h>
+ #include <boost/format.hpp>
#include <signal.h>
#include <stdio.h>
***************
*** 23,27 ****
void int_handler(int intno)
{
! output.information("Interrupt " + int2string(intno), DEBUG_OUTPUT);
if(intno == SIGCHLD) {
pid_t k_pid;
--- 24,28 ----
void int_handler(int intno)
{
! output.information(F_("signal %d") % intno, DEBUG_OUTPUT);
if(intno == SIGCHLD) {
pid_t k_pid;
***************
*** 45,54 ****
bigBrother.child_died_abnormal(k_pid);
}
! output.information("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!child no. " + int2string(k_pid) + " died!", DEBUG_OUTPUT);
}
errno = alt_errno; /* reset errno */
} //else if(intno == SIGPIPE) {}
else {
! output.warning("unknown SIGNAL " + int2string(intno), 0);
bigBrother.killAll();
output.adderrors(1);
--- 46,56 ----
bigBrother.child_died_abnormal(k_pid);
}
! output.information(F_("child no. %d died!")
! % k_pid, DEBUG_OUTPUT);
}
errno = alt_errno; /* reset errno */
} //else if(intno == SIGPIPE) {}
else {
! output.warning(F_("unknown SIGNAL %d") % intno, 0);
bigBrother.killAll();
output.adderrors(1);
Index: backup_control.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/backup_control.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** backup_control.cpp 16 Jun 2005 10:53:34 -0000 1.15
--- backup_control.cpp 21 Jun 2005 09:16:44 -0000 1.16
***************
*** 216,220 ****
output.information("network online", DEBUG_OUTPUT);
string lastbackupdir = dir_getlast(destdir, lastbackup);
! output.information("old backup dir: " + lastbackupdir, DEBUG_OUTPUT);
com_Distributor.sendInteger(lastbackup.year);
com_Distributor.sendInteger(lastbackup.month);
--- 216,221 ----
output.information("network online", DEBUG_OUTPUT);
string lastbackupdir = dir_getlast(destdir, lastbackup);
! output.information(F_("old backup dir: %s")
! % lastbackupdir, DEBUG_OUTPUT);
com_Distributor.sendInteger(lastbackup.year);
com_Distributor.sendInteger(lastbackup.month);
Index: system_calls.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/system_calls.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** system_calls.cpp 16 Jun 2005 14:37:08 -0000 1.7
--- system_calls.cpp 21 Jun 2005 09:16:45 -0000 1.8
***************
*** 63,67 ****
//linkname = network->readData();
! output.information("getRegFileLink: " + name + " " + link_dest, DEBUG_OUTPUT);
/*
* create link
--- 63,67 ----
//linkname = network->readData();
! output.information(F_("link %s %s") % name % link_dest, DEBUG_OUTPUT);
/*
* create link
***************
*** 450,455 ****
if(username != "")
username.append("@");
! output.information("ssh: " + username + destination_host + " " + cmd,
! DEBUG_OUTPUT);
execlp(ssh_command.c_str(), ssh_command.c_str(),
--- 450,455 ----
if(username != "")
username.append("@");
! output.information(F_("starting '%s %s%s %s'") % ssh_command
! % username % destination_host % cmd, DEBUG_OUTPUT);
execlp(ssh_command.c_str(), ssh_command.c_str(),
***************
*** 624,628 ****
ret = mkdir( directory.c_str(), 0700 );
if( ret<0 ) {
! output.critical("mkdir(\"" + directory + "): ", errno );
}
return( directory );
--- 624,628 ----
ret = mkdir( directory.c_str(), 0700 );
if( ret<0 ) {
! output.critical(F_("mkdir %s") % directory, errno );
}
return( directory );
***************
*** 652,657 ****
ret = utime( dir.c_str(), &u );
if( ret < 0 ) {
! output.warning(string("utime(\""+dir+ "\", [...]): ")
! , errno);
}
--- 652,656 ----
ret = utime( dir.c_str(), &u );
if( ret < 0 ) {
! output.warning(F_("utime %s") % dir, errno);
}
Index: registration.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/registration.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** registration.cpp 14 Jun 2005 20:44:20 -0000 1.6
--- registration.cpp 21 Jun 2005 09:16:45 -0000 1.7
***************
*** 4,7 ****
--- 4,8 ----
#include <sys/wait.h>
+ #include <boost/format.hpp>
#include <signal.h>
***************
*** 28,35 ****
void Registration::child_died_abnormal(pid_t pid)
{
- output.information("child died abnormal! " + int2string(pid),
- DEBUG_OUTPUT);
killAll();
! output.critical("Child died abnormal: " + int2string(pid), 0);
}
--- 29,34 ----
void Registration::child_died_abnormal(pid_t pid)
{
killAll();
! output.critical(F_("Child died abnormal: signal %d") % pid, 0);
}
Index: fileinfo.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/fileinfo.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fileinfo.cpp 14 Jun 2005 22:10:17 -0000 1.4
--- fileinfo.cpp 21 Jun 2005 09:16:45 -0000 1.5
***************
*** 46,52 ****
offset += link_size;
if(offset != size)
! output.critical("internal error calculating Fileinfo from"
! "rawData: " + int2string(offset) + " "
! + int2string(size),0);
fileName = filename_c;
--- 46,51 ----
offset += link_size;
if(offset != size)
! output.critical(F_("internal error calculating Fileinfo from"
! "rawData: %d != %d") % offset % size, 0);
fileName = filename_c;
***************
*** 97,103 ****
offset += link_to_file.length() + 1;
if(offset != size)
! output.critical("internal error calculating Fileinfo rawData: "
! + int2string(offset) + " "
! + int2string(size),0);
return return_pointer;
--- 96,101 ----
offset += link_to_file.length() + 1;
if(offset != size)
! output.critical(F_("internal error calculating Fileinfo "
! "rawData: %s != %s") % offset % size, 0);
return return_pointer;
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click