autofs-5.0.8 - don't reset errno From: Werner Fink Do not reset the error code that might just have been set to ENOTDIR. --- CHANGELOG | 1 + daemon/automount.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 82d44b6..6ff7c9b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,7 @@ - fix protmap not trying proto v2. - fix rpc_getport() when libtirpc is disabled. - fix rpc_getrpcbport() when libtirpc is disabled. +- don't reset errno. 17/10/2013 autofs-5.0.8 ======================= diff --git a/daemon/automount.c b/daemon/automount.c index 7504e31..0cb8ca4 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -107,9 +107,9 @@ static int do_mkdir(const char *parent, const char *path, mode_t mode) /* If path exists we're done */ status = stat(path, &st); if (status == 0) { + errno = EEXIST; if (!S_ISDIR(st.st_mode)) errno = ENOTDIR; - errno = EEXIST; return 0; }