From a2b798939612ef6b40f67e8da36e9a532c869b47 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 28 Jan 2006 13:12:58 +0000 Subject: * infrastructure/makeparcels.pl - Use the target platform's name, rather than the build platform, in the generated package file names (useful for cross-compiling) * lib/win32/emu.cpp - Don't log a warning when statting a file that doesn't exist, as bbackupquery does this to verify that the target does not exist before restoring * lib/backupclient/BackupClientFileAttributes.cpp - Fixed a missing endian conversion that was causing file timestamps to appear to be invalid, generating warnings about every file on the server, on Win32 * parcels.txt - Include a couple of DLL files in the package on MinGW, which are needed to run the compiled binaries * bin/bbackupquery/BackupQueries.cpp - Fixed usage text for the "get" command --- bin/bbackupquery/BackupQueries.cpp | 4 +++- infrastructure/makeparcels.pl | 2 +- lib/backupclient/BackupClientFileAttributes.cpp | 20 ++++++++++++-------- lib/win32/emu.cpp | 2 -- parcels.txt | 5 +++++ 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp index 02b60aa3..473daaf6 100644 --- a/bin/bbackupquery/BackupQueries.cpp +++ b/bin/bbackupquery/BackupQueries.cpp @@ -779,7 +779,9 @@ void BackupQueries::CommandGet(const std::vector &args, const bool // Check args if(args.size() < 1 || (opts['i'] && args.size() != 2) || args.size() > 2) { - printf("Incorrect usage.\ngetobject \n or get -i \n"); + printf("Incorrect usage.\n" + "get [] or\n" + "get -i \n"); return; } diff --git a/infrastructure/makeparcels.pl b/infrastructure/makeparcels.pl index 55e64976..ea5d6ae9 100755 --- a/infrastructure/makeparcels.pl +++ b/infrastructure/makeparcels.pl @@ -169,7 +169,7 @@ close INSTALLMSG; sub parcel_root { - $product_name.'-'.$product_version.'-'.$_[0].'-'.$build_os.$os_suffix + $product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os.$os_suffix } sub parcel_dir diff --git a/lib/backupclient/BackupClientFileAttributes.cpp b/lib/backupclient/BackupClientFileAttributes.cpp index a31cd7b4..3e59a265 100644 --- a/lib/backupclient/BackupClientFileAttributes.cpp +++ b/lib/backupclient/BackupClientFileAttributes.cpp @@ -330,21 +330,25 @@ void BackupClientFileAttributes::ReadAttributes(const char *Filename, bool ZeroM // __time64_t winTime = BoxTimeToSeconds( // pnewAttr->ModificationTime); - box_time_t bob = BoxTimeToSeconds(pattr->ModificationTime); - __time64_t winTime = bob; + u_int64_t modTime = box_ntoh64(pattr->ModificationTime); + box_time_t modSecs = BoxTimeToSeconds(modTime); + __time64_t winTime = modSecs; + if (_gmtime64(&winTime) == 0 ) { - ::syslog(LOG_ERR, "Corrupt value in store " - "Modification Time in file %s", Filename); + ::syslog(LOG_ERR, "Invalid Modification Time " + "caught for file: %s", Filename); pattr->ModificationTime = 0; } - bob = BoxTimeToSeconds(pattr->AttrModificationTime); - winTime = bob; + modTime = box_ntoh64(pattr->AttrModificationTime); + modSecs = BoxTimeToSeconds(modTime); + winTime = modSecs; + if (_gmtime64(&winTime) == 0 ) { - ::syslog(LOG_ERR, "Corrupt value in store " - "Attr Modification Time in file %s", Filename); + ::syslog(LOG_ERR, "Invalid Attribute Modification " + "Time caught for file: %s", Filename); pattr->AttrModificationTime = 0; } #endif diff --git a/lib/win32/emu.cpp b/lib/win32/emu.cpp index 29200313..17ac698f 100644 --- a/lib/win32/emu.cpp +++ b/lib/win32/emu.cpp @@ -500,8 +500,6 @@ HANDLE OpenFileByNameUtf8(const char* pName) if (err == ERROR_FILE_NOT_FOUND) { - ::syslog(LOG_WARNING, - "Failed to open '%s': file not found", pName); errno = ENOENT; } else diff --git a/parcels.txt b/parcels.txt index 5a4b50cf..511f3ab0 100644 --- a/parcels.txt +++ b/parcels.txt @@ -12,6 +12,11 @@ backup-client script bin/bbackupd/win32/ReadMe.txt script bin/bbackupd/win32/bbackupd.conf + ONLY:mingw32 + script /bin/mgwz.dll + script /bin/mingwm10.dll + END-ONLY + OMIT:mingw32 OMIT:CYGWIN -- cgit v1.2.1