Date: Mon, 8 Jun 1998 20:13:42 -0700 (PDT) From: Nate Eldredge To: djgpp-workers AT delorie DOT com Subject: Stat modes different from Unix systems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk While porting `mkisofs' to DJGPP, I found a problem. DJGPP's numerical stat mode values are different from those on Unix boxen. For example, our flag for directories is 0x3000, while the Unix systems I saw (Linux, IRIX and FreeBSD) all have 0x4000 (040000 octal). Worse yet, regular files have an absence of special flags for us, while Unices have 0x8000! This was a problem because the Rock Ridge directory entries (which have Unix long file names and permission/file type info) contain the literal `st_mode' value obtained from `stat', and those are interpreted verbatim by the system that reads the image. Thus, when I tried to mount an ISO image created by my port, Linux saw bogus modes, and nothing worked. I was able to work around by explicitly modifying the `st_mode' field inside of `mkisofs', but I wonder what the Right Thing is. I don't know if this is just a case of `mkisofs' being non-portable, or the Rock Ridge format being a kludge, or Linux being stupid (I doubt the latter). It's suspicious that the SGI IRIX headers refer to those values as "de facto standard". Is it worth it for us to change our numbers to be compatible? What else are we likely to break? Nate Eldredge nate AT cartsys DOT com