From 05debbadf4dbf6b00d75f46e375031975ed3dbb8 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 10 Jul 2007 09:01:07 +0000 Subject: [PATCH] Mac: log_flags.state_debug prints errno when rename of client_state_next.xml to client_state.xml fails svn path=/trunk/boinc/; revision=13128 --- checkin_notes | 7 +++++++ client/cs_statefile.C | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 458ad7c015..f0c97e69be 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7135,3 +7135,10 @@ David 9 July 2007 constraints.sql py/Boinc/ setup_project.py + +Charlie 10 July 2007 + Mac: log_flags.state_debug prints errno when rename of + client_state_next.xml to client_state.xml fails + + client/ + cs_statefile.C diff --git a/client/cs_statefile.C b/client/cs_statefile.C index ed8ada3258..59ea4315f4 100644 --- a/client/cs_statefile.C +++ b/client/cs_statefile.C @@ -31,6 +31,9 @@ #include "file_names.h" #include "client_msgs.h" #include "client_state.h" +#ifdef __APPLE__ +#include +#endif void CLIENT_STATE::set_client_state_dirty(const char* source) { if (log_flags.state_debug) { @@ -542,8 +545,8 @@ int CLIENT_STATE::write_state_file() { #ifdef __APPLE__ if (log_flags.state_debug) { msg_printf(0, MSG_USER_ERROR, - "rename %s to %s returned error %d", - STATE_FILE_NEXT, STATE_FILE_NAME, retval); + "rename %s to %s returned error %d: %s", + STATE_FILE_NEXT, STATE_FILE_NAME, errno, strerror(errno)); system("ls -al /Library/Application\\ Support/BOINC\\ Data/client*.*"); } #endif