List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:August 20 2010 2:54pm
Subject:bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:3763)
View as plain text  
#At file:///home/msvensson/mysql/tmp/eIngP4XsNl/mysql-5.1-telco-7.1/ based on revid:martin.skold@stripped0141205-aximzj6cmo093oim

 3763 Magnus Blåudd	2010-08-20 [merge]
      Merge

    modified:
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp
=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2010-08-13 11:14:26 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2010-08-20 10:59:14 +0000
@@ -53,7 +53,7 @@
 #include <NdbConfig.h>
 
 #include <NdbAutoPtr.hpp>
-
+#include <NdbDir.hpp>
 #include <ndberror.h>
 
 #include <mgmapi.h>
@@ -274,28 +274,6 @@ MgmtSrvr::MgmtSrvr(const MgmtOpts& opts)
 }
 
 
-static bool
-create_directory(const char* dir)
-{
-#ifdef __WIN__
-  if (CreateDirectory(dir, NULL) == 0)
-  {
-    g_eventLogger->warning("Failed to create directory '%s', error: %d",
-                           dir, GetLastError());
-    return false;
-  }
-#else
-  if (mkdir(dir, S_IRUSR | S_IWUSR | S_IXUSR ) != 0)
-  {
-    g_eventLogger->warning("Failed to create directory '%s', error: %d",
-                           dir, errno);
-    return false;
-  }
-#endif
-  return true;
-}
-
-
 /*
   check_configdir
 
@@ -329,7 +307,7 @@ MgmtSrvr::check_configdir() const
                           "does not exist. Trying to create it...",
                           MYSQLCLUSTERDIR);
 
-      if (!create_directory(MYSQLCLUSTERDIR) ||
+      if (!NdbDir::create(MYSQLCLUSTERDIR) ||
           access(MYSQLCLUSTERDIR, F_OK))
       {
         g_eventLogger->error("Could not create directory '%s'. "        \

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20100820145424-prbh9h6wk2kvsjoc.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:3763) Magnus Blåudd20 Aug