[PATCH] autofs-5.0.7 don't reset errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ian,

Please consider the patch below for inclusion.

Thanks,
Leonardo

From: Werner Fink <werner@xxxxxxx>

Do not reset the error code that might just have been set to ENOTDIR.

Index: autofs/daemon/automount.c
===================================================================
--- autofs.orig/daemon/automount.c
+++ autofs/daemon/automount.c
@@ -107,9 +107,9 @@ static int do_mkdir(const char *parent,
 	/* 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;
 	}
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux