git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount.

From
Jason Riedy <ejr@eecs.berkeley.edu>
Date
Feb 2, 2006, 00:39 UTC
Message-ID
<24768.1138840762@lotus.CS.Berkeley.EDU>

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
Next: Junio C Hamano
Message 1 of 4 in “Solaris 8: ENOSYS when mkdir applied to automount.”
  1. Solaris 8: ENOSYS when mkdir applied to automount.Jason Riedy, Feb 2, 2006
  2. Junio C HamanoFeb 2, 2006
  3. Jason RiedyFeb 2, 2006
  4. H. Peter AnvinFeb 2, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.