initialize fs_stat->files

This commit is contained in:
wbaumann 2009-11-14 08:43:24 +00:00
parent 20e646de3f
commit 8b46082e32
3 changed files with 21 additions and 14 deletions

View File

@ -1,9 +1,13 @@
ChangeLog for davfs2
--------------------

2009-11-14 Werner Baumann (werner.baumann@onlinehome.de)
* cache.c, dav_init_cache:
Initialize fs_stat->files.

2009-11-03 Werner Baumann (werner.baumann@onlinehome.de)
* webdav.c, ssl_verify:
Don't accept suspidious certificates if !have_terminal.
Don't accept suspicious certificates if !have_terminal.

2009-10-18 Werner Baumann (werner.baumann@onlinehome.de)
* mount_davfs.c, webdav.c:

2
TODO
View File

@ -30,3 +30,5 @@ davfs2 TODO 2009-10-23
by broken server implementations (see Debian bug #551782 - davfs2:
improve the output in case of a server with a broken LOCK)

- integrate with gnome-keyring?


View File

@ -613,6 +613,20 @@ dav_init_cache(const dav_args *args, const char *mpoint)
fs_stat = (dav_stat *) malloc(sizeof(dav_stat));
if (!fs_stat) abort();

fs_stat->blocks = 0x65B9AA;
fs_stat->bfree = 0x32DCD5;
fs_stat->bavail = 0x32DCD5;
fs_stat->files = 0;
fs_stat->ffree = 666666;
struct stat cache_st;
if (stat(cache_dir, &cache_st) == 0) {
fs_stat->bsize = cache_st.st_blksize;
} else {
fs_stat->bsize = 4096;
}
fs_stat->namelen = 256;
fs_stat->utime = 0;

if (debug)
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Checking cache directory");
max_cache_size = args->cache_size * 0x100000;
@ -635,19 +649,6 @@ dav_init_cache(const dav_args *args, const char *mpoint)

clean_cache();

fs_stat->blocks = 0x65B9AA;
fs_stat->bfree = 0x32DCD5;
fs_stat->bavail = 0x32DCD5;
fs_stat->ffree = 666666;
struct stat cache_st;
if (stat(cache_dir, &cache_st) == 0) {
fs_stat->bsize = cache_st.st_blksize;
} else {
fs_stat->bsize = 4096;
}
fs_stat->namelen = 256;
fs_stat->utime = 0;

int ret = update_directory(root, 0);
if (ret == EAGAIN) {
root->utime = 0;