]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bsys.c
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / lib / bsys.c
index ab5ebe50ae44f0420a50a194e89a10448144b28f..4a4569ad53d316a9ef922e428f29c4a926e03c35 100644 (file)
@@ -1033,11 +1033,12 @@ int fs_get_free_space(const char *path, int64_t *freeval, int64_t *totalval)
    struct statvfs st;
 
    if (statvfs(path, &st) == 0) {
-      *freeval = (uint64_t)st.f_bsize * (uint64_t)st.f_bavail;
+      *freeval  = (uint64_t)st.f_bavail * (uint64_t)st.f_frsize;
       *totalval = (uint64_t)st.f_blocks * (uint64_t)st.f_frsize;
       return 0;
    }
 #endif
+
    *totalval = *freeval = 0;
    return -1;
 }