This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

No mkdir in glibgloss/syscall.h? (Was:Re: RFA: Add Epiphany newlib & libgloss port)


Quoting Jim Meyering <jim@meyering.net>:

stat always succeeds.  Even with a very rudimentary file system, shouldn't
  stat be able to fail with ENOENT, EFAULT, ENAMETOOLONG, ENOTDIR, etc?

fstat always succeeds. What about EBADF, EFAULT, etc.?

The file system would be the host file system of the simulator. However, there is currently no interface for stat in the simulator. I was just looking to adding one, but the implemented syscalls are simple traps, and there is one trap that had been earmarked for syscalls in general with a subcode. So I would have to adopt a syscall numbering for that.

I thought using libgloss/syscall.h would be a good choice for a bare-metal
port.

However, one thing I'd also like to get from such an interface is mkdir -
that's needed for fully-functional profiling with gcc, otherwise it will
only work if the profile output pathname is in an existing directory.

Can we add mkdir to libgloss/syscalls.h ?
Or is every port that needs more that what's provided there supposed to
roll their own?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]