git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount., 
@ 2006-02-02  0:39 Jason Riedy
  2006-02-02  0:46 ` [RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount Junio C Hamano
  2006-02-02  4:18 ` H. Peter Anvin
  0 siblings, 2 replies; 4+ messages in thread
From: Jason Riedy @ 2006-02-02  0:39 UTC (permalink / raw)
  To: git

I guess our home directories recently were changed from symlinks
to autmounts.  Solaris 8's mkdir(2) returns ENOSYS when applied
to these, breaking safe_create_leading_directories.  I don't
know if ENOSYS is available everywhere, or if this odd behavior
is appropriate everywhere.

This works for me, but should I wrap mkdir for bizarre behavior
by adding a compat/gitmkdir.c?

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>

---

 sha1_file.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

4f388cf48271ec1547817a407ef1afe432cd59d4
diff --git a/sha1_file.c b/sha1_file.c
index 20f6419..65407e2 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -83,7 +83,15 @@ int safe_create_leading_directories(char
 			break;
 		*pos = 0;
 		if (mkdir(path, 0777) < 0) {
+#if !defined(ENOSYS)
 			if (errno != EEXIST) {
+#else
+			if (errno != EEXIST && errno != ENOSYS) {
+#endif
+/* 
+ * Solaris 8 appears to return ENOSYS when mkdir is applied 
+ * to an automount.
+ */
 				*pos = '/';
 				return -1;
 			}
-- 
1.1.6.g7159

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-02  4:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-02  0:39 [RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount., Jason Riedy
2006-02-02  0:46 ` [RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount Junio C Hamano
2006-02-02  4:14   ` Jason Riedy
2006-02-02  4:18 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).