git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jason Riedy <ejr@EECS.Berkeley.EDU>
To: git@vger.kernel.org
Subject: [RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount.
Subject: 
Date: Wed, 01 Feb 2006 16:39:22 -0800	[thread overview]
Message-ID: <24768.1138840762@lotus.CS.Berkeley.EDU> (raw)

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

             reply	other threads:[~2006-02-02  0:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02  0:39 Jason Riedy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24768.1138840762@lotus.CS.Berkeley.EDU \
    --to=ejr@eecs.berkeley.edu \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).