]> git.sur5r.net Git - bacula/bacula/commitdiff
added GetVolumePathW and GetVolumeNameForVolumeMountPointW to winapi. This allows...
authorThorsten Engel <thorsten.engel@matrix-computer.com>
Mon, 5 Sep 2005 14:39:22 +0000 (14:39 +0000)
committerThorsten Engel <thorsten.engel@matrix-computer.com>
Mon, 5 Sep 2005 14:39:22 +0000 (14:39 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2381 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/status.c
bacula/src/lib/winapi.c
bacula/src/lib/winapi.h

index daa6b15e3283bcf9eeba75d1d7e14ad8f298001b..755fe7254d6cb5b263c9488fb124dc0d94979373 100755 (executable)
@@ -109,9 +109,11 @@ static void do_status(void sendit(const char *msg, int len, void *sarg), void *a
                  p_SetCurrentDirectoryA?"":"!",
                  p_SetCurrentDirectoryW?"":"!");
       sendit(msg, len, arg);
-      len = Mmsg(msg, " %sGCDA,%sGCDW\n",  
+      len = Mmsg(msg, " %sGCDA,%sGCDW,%sGVPNW,%sGVNFVMPW\n",  
                  p_GetCurrentDirectoryA?"":"!",
-                 p_GetCurrentDirectoryW?"":"!");
+                 p_GetCurrentDirectoryW?"":"!",
+                 p_GetVolumePathNameW?"":"!",
+                 p_GetVolumeNameForVolumeMountPointW?"":"!");
      sendit(msg, len, arg);
    }
 #endif
index 45d382ad9e83dfba696dae3db78ee47f910d46f8..c23d25f4cdf61026e59e17401e8ca58db2f881ea 100644 (file)
@@ -78,6 +78,9 @@ t_SetCurrentDirectoryW p_SetCurrentDirectoryW = NULL;
 t_GetCurrentDirectoryA p_GetCurrentDirectoryA = NULL;
 t_GetCurrentDirectoryW p_GetCurrentDirectoryW = NULL;
 
+t_GetVolumePathNameW p_GetVolumePathNameW = NULL;
+t_GetVolumeNameForVolumeMountPointW p_GetVolumeNameForVolumeMountPointW = NULL;
+
 #ifdef WIN32_VSS
 void 
 VSSCleanup()
@@ -143,6 +146,14 @@ InitWinAPIWrapper()
           GetProcAddress(hLib, "GetCurrentDirectoryA");
       p_GetCurrentDirectoryW = (t_GetCurrentDirectoryW)
           GetProcAddress(hLib, "GetCurrentDirectoryW");      
+
+      /* some special stuff we need for VSS
+         but statically linkage doesn't work on Win 9x */
+      p_GetVolumePathNameW = (t_GetVolumePathNameW)
+          GetProcAddress(hLib, "GetVolumePathNameW");
+      p_GetVolumeNameForVolumeMountPointW = (t_GetVolumeNameForVolumeMountPointW)
+          GetProcAddress(hLib, "GetVolumeNameForVolumeMountPointW");
+    
       FreeLibrary(hLib);
    }
    
@@ -206,6 +217,9 @@ InitWinAPIWrapper()
       p_wunlink = NULL;
       p_wmkdir = NULL;
       p_wopen = NULL;
+
+      p_GetVolumePathNameW = NULL;
+      p_GetVolumeNameForVolumeMountPointW = NULL;
    }   
 
    /* decide which vss class to initialize */
index 1b815d51d9fb8299570965ac1e020c40072e5390..a138f04f470c29197e468e6cf981ea5df1e25861 100644 (file)
@@ -109,6 +109,9 @@ typedef BOOL (WINAPI * t_SetCurrentDirectoryW) (LPCWSTR);
 typedef DWORD (WINAPI * t_GetCurrentDirectoryA) (DWORD, LPSTR);
 typedef DWORD (WINAPI * t_GetCurrentDirectoryW) (DWORD, LPWSTR);
 
+typedef BOOL (WINAPI * t_GetVolumePathNameW) (LPCWSTR, LPWSTR, DWORD);
+typedef BOOL (WINAPI * t_GetVolumeNameForVolumeMountPointW) (LPCWSTR, LPWSTR, DWORD);
+  
 extern t_GetFileAttributesA   p_GetFileAttributesA;
 extern t_GetFileAttributesW   p_GetFileAttributesW;
 
@@ -139,6 +142,9 @@ extern t_SetCurrentDirectoryW p_SetCurrentDirectoryW;
 extern t_GetCurrentDirectoryA p_GetCurrentDirectoryA;
 extern t_GetCurrentDirectoryW p_GetCurrentDirectoryW;
 
+extern t_GetVolumePathNameW p_GetVolumePathNameW;
+extern t_GetVolumeNameForVolumeMountPointW p_GetVolumeNameForVolumeMountPointW;
+          
 #ifdef WIN32_VSS
 class  VSSClient;
 extern VSSClient* g_pVSSClient;