bug-cvs
[Top][All Lists]
Advanced

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

A patch to work around a bug in IRIX mkdir().


From: Jorma Laaksonen
Subject: A patch to work around a bug in IRIX mkdir().
Date: 30 Sep 2002 11:12:07 +0300
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

Dear Sirs,

Please find below a patch that might be useful to implement in
server.c.  It circumvents a "feature" of SGI IRIX systems where
mkdir() on an existing NFS mounted directory doesn't return EEXIST as
mkdir_p() assumes.  Instead it returns ENOSYS, which seems to be an
undocumented feature of IRIX...

(I don't know if that same problem exists also in other locations.)

Yours faithfully,

Jorma Laaksonen

*** src/server.c.orig   Tue Mar 19 21:15:45 2002
--- src/server.c        Mon Sep 30 10:55:33 2002
***************
*** 542,547 ****
--- 542,552 ----
            {
                int saved_errno = errno;

+ #ifdef sgi
+               if (saved_errno == ENOSYS && isdir (q))
+                 saved_errno = EEXIST;
+ #endif /*sgi*/
+
                if (saved_errno != EEXIST
                    && ((saved_errno != EACCES && saved_errno != EROFS)
                        || !isdir (q)))

-- 
Jorma Laaksonen                                 email: jorma.laaksonen@hut.fi
Dr. of Science in Technology, Docent            http://www.cis.hut.fi/jorma/
Laboratory of Computer and Information Science  tel. +358-9-4513269
Helsinki University of Technology               fax. +358-9-4513277
P.O.Box 5400, Fin-02015 HUT, Finland            mob. +358-50-3058719




reply via email to

[Prev in Thread] Current Thread [Next in Thread]