From 706ef88715bf3289d263c63d02140103c0e437d6 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 31 Dec 2002 20:19:50 +0000 Subject: [PATCH] Start of Solaris bare metal recovery git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@256 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 1 + bacula/configure | 2 ++ bacula/kernstodo | 1 + bacula/src/dird/dird.c | 5 ++--- bacula/src/dird/verify.c | 28 ++++++++++++++++------------ bacula/src/filed/restore.c | 3 ++- bacula/src/findlib/find_one.c | 2 +- bacula/src/version.h | 4 ++-- 8 files changed, 27 insertions(+), 19 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 2ca1069c6e..6bc742e278 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1284,6 +1284,7 @@ AC_OUTPUT([autoconf/Make.common \ rescue/Makefile \ rescue/linux/Makefile \ rescue/freebsd/Makefile \ + rescue/solaris/Makefile \ scripts/startmysql \ scripts/stopmysql \ scripts/btraceback \ diff --git a/bacula/configure b/bacula/configure index 566a9fd96d..01cb5fbe06 100755 --- a/bacula/configure +++ b/bacula/configure @@ -9442,6 +9442,7 @@ trap 'rm -fr `echo "autoconf/Make.common \ rescue/Makefile \ rescue/linux/Makefile \ rescue/freebsd/Makefile \ + rescue/solaris/Makefile \ scripts/startmysql \ scripts/stopmysql \ scripts/btraceback \ @@ -9700,6 +9701,7 @@ CONFIG_FILES=\${CONFIG_FILES-"autoconf/Make.common \ rescue/Makefile \ rescue/linux/Makefile \ rescue/freebsd/Makefile \ + rescue/solaris/Makefile \ scripts/startmysql \ scripts/stopmysql \ scripts/btraceback \ diff --git a/bacula/kernstodo b/bacula/kernstodo index 01f1536673..18262346fb 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -17,6 +17,7 @@ For 1.28 release: a single device. For 1.29 release: +- Enable avoid backing up archive device (findlib/find_one.c:128) - Implement FileOptions (see end of this document) - Implement Bacula plugins -- design API - Make hash table for linked files in findlib/find_one.c:161 diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index 20824a2a63..23b3128f39 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -49,7 +49,6 @@ extern void init_job_server(int max_workers); static char *configfile = NULL; static char *runjob = NULL; - static int background = 1; /* Globals Exported */ @@ -175,8 +174,8 @@ int main (int argc, char *argv[]) my_name_is(0, NULL, director->hdr.name); /* set user defined name */ - FDConnectTimeout = director->FDConnectTimeout; - SDConnectTimeout = director->SDConnectTimeout; + FDConnectTimeout = (int)director->FDConnectTimeout; + SDConnectTimeout = (int)director->SDConnectTimeout; if (background) { daemon_start(); diff --git a/bacula/src/dird/verify.c b/bacula/src/dird/verify.c index 14c47c3c83..626cd89edd 100644 --- a/bacula/src/dird/verify.c +++ b/bacula/src/dird/verify.c @@ -463,12 +463,14 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId) * fields he requests. */ for (p=Opts_MD5; *p; p++) { + char ed1[30], ed2[30]; switch (*p) { case 'i': /* compare INODEs */ if (statc.st_ino != statf.st_ino) { prt_fname(jcr); - Jmsg(jcr, M_INFO, 0, _(" st_ino differ. Cat: %x File: %x\n"), - statc.st_ino, statf.st_ino); + Jmsg(jcr, M_INFO, 0, _(" st_ino differ. Cat: %s File: %s\n"), + edit_uint64((uint64_t)statc.st_ino, ed1), + edit_uint64((uint64_t)statf.st_ino, ed2)); stat = JS_Differences; } break; @@ -476,7 +478,7 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId) if (statc.st_mode != statf.st_mode) { prt_fname(jcr); Jmsg(jcr, M_INFO, 0, _(" st_mode differ. Cat: %x File: %x\n"), - statc.st_mode, statf.st_mode); + (uint32_t)statc.st_mode, (uint32_t)statf.st_mode); stat = JS_Differences; } break; @@ -484,31 +486,32 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId) if (statc.st_nlink != statf.st_nlink) { prt_fname(jcr); Jmsg(jcr, M_INFO, 0, _(" st_nlink differ. Cat: %d File: %d\n"), - statc.st_nlink, statf.st_nlink); + (uint32_t)statc.st_nlink, (uint32_t)statf.st_nlink); stat = JS_Differences; } break; case 'u': /* user id */ if (statc.st_uid != statf.st_uid) { prt_fname(jcr); - Jmsg(jcr, M_INFO, 0, _(" st_uid differ. Cat: %d File: %d\n"), - statc.st_uid, statf.st_uid); + Jmsg(jcr, M_INFO, 0, _(" st_uid differ. Cat: %u File: %u\n"), + (uint32_t)statc.st_uid, (uint32_t)statf.st_uid); stat = JS_Differences; } break; case 'g': /* group id */ if (statc.st_gid != statf.st_gid) { prt_fname(jcr); - Jmsg(jcr, M_INFO, 0, _(" st_gid differ. Cat: %d File: %d\n"), - statc.st_gid, statf.st_gid); + Jmsg(jcr, M_INFO, 0, _(" st_gid differ. Cat: %u File: %u\n"), + (uint32_t)statc.st_gid, (uint32_t)statf.st_gid); stat = JS_Differences; } break; case 's': /* size */ if (statc.st_size != statf.st_size) { prt_fname(jcr); - Jmsg(jcr, M_INFO, 0, _(" st_size differ. Cat: %d File: %d\n"), - statc.st_size, statf.st_size); + Jmsg(jcr, M_INFO, 0, _(" st_size differ. Cat: %s File: %s\n"), + edit_uint64((uint64_t)statc.st_size, ed1), + edit_uint64((uint64_t)statf.st_size, ed2)); stat = JS_Differences; } break; @@ -536,8 +539,9 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId) case 'd': /* file size decrease */ if (statc.st_size > statf.st_size) { prt_fname(jcr); - Jmsg(jcr, M_INFO, 0, _(" st_size decrease. Cat: %d File: %d\n"), - statc.st_size, statf.st_size); + Jmsg(jcr, M_INFO, 0, _(" st_size decrease. Cat: %s File: %s\n"), + edit_uint64((uint64_t)statc.st_size, ed1), + edit_uint64((uint64_t)statf.st_size, ed2)); stat = JS_Differences; } break; diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index a0acc19d51..be6be79c95 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -106,8 +106,9 @@ void do_restore(JCR *jcr) /* * Now we expect the Stream Data */ - if (bnet_recv(sd) < 0 && !job_cancelled(jcr)) { + if (bnet_recv(sd) < 0) { Jmsg1(jcr, M_FATAL, 0, _("Data record error. ERR=%s\n"), bnet_strerror(sd)); + goto bail_out; } if (size != (uint32_t)sd->msglen) { Jmsg2(jcr, M_FATAL, 0, _("Actual data size %d not same as header %d\n"), sd->msglen, size); diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index 3a62a6b766..b36f798cf6 100755 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -149,7 +149,7 @@ find_one_file(FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), void *pkt struct f_link *lp; - /* keep linked list of files */ + /* Search link list of hard linked files */ for (lp = ff_pkt->linklist; lp; lp = lp->next) if (lp->ino == ff_pkt->statp.st_ino && lp->dev == ff_pkt->statp.st_dev) { ff_pkt->link = lp->name; diff --git a/bacula/src/version.h b/bacula/src/version.h index fe6ffcf823..393a34af24 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #define VERSION "1.28" #define VSTRING "1" -#define DATE "28 December 2002" -#define LSMDATE "28Dec02" +#define DATE "30 December 2002" +#define LSMDATE "30Dec02" /* Debug flags */ #define DEBUG 1 -- 2.39.5