dovecot: Added nfs_safe_lstat()

dovecot at dovecot.org dovecot at dovecot.org
Fri Jul 13 00:18:31 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/885ed4d5c51d
changeset: 5968:885ed4d5c51d
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jul 12 23:50:54 2007 +0300
description:
Added nfs_safe_lstat()

diffstat:

2 files changed, 13 insertions(+)
src/lib/nfs-workarounds.c |   12 ++++++++++++
src/lib/nfs-workarounds.h |    1 +

diffs (29 lines):

diff -r 0a6dd369afff -r 885ed4d5c51d src/lib/nfs-workarounds.c
--- 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 @@ int nfs_safe_stat(const char *path, stru
 {
 	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);
+}
diff -r 0a6dd369afff -r 885ed4d5c51d src/lib/nfs-workarounds.h
--- 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 
 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


More information about the dovecot-cvs mailing list