Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5968:885ed4d5c51d HEAD
Added nfs_safe_lstat()
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 12 Jul 2007 23:50:54 +0300 |
parents | 0a6dd369afff |
children | 29770d8a013b |
files | src/lib/nfs-workarounds.c src/lib/nfs-workarounds.h |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/nfs-workarounds.c Thu Jul 12 06:41:06 2007 +0300 +++ b/src/lib/nfs-workarounds.c Thu Jul 12 23:50:54 2007 +0300 @@ -84,3 +84,15 @@ { return nfs_safe_do(path, nfs_safe_stat_callback, buf); } + +static int nfs_safe_lstat_callback(const char *path, void *context) +{ + struct stat *buf = context; + + return lstat(path, buf); +} + +int nfs_safe_lstat(const char *path, struct stat *buf) +{ + return nfs_safe_do(path, nfs_safe_lstat_callback, buf); +}
--- a/src/lib/nfs-workarounds.h Thu Jul 12 06:41:06 2007 +0300 +++ b/src/lib/nfs-workarounds.h Thu Jul 12 23:50:54 2007 +0300 @@ -12,5 +12,6 @@ int nfs_safe_open(const char *path, int flags); /* stat() with some NFS workarounds */ int nfs_safe_stat(const char *path, struct stat *buf); +int nfs_safe_lstat(const char *path, struct stat *buf); #endif