No mkdir in glibgloss/syscall.h? (Was:Re: RFA: Add Epiphany newlib & libgloss port)
Sun Nov 6 18:46:00 GMT 2011
Quoting Jim Meyering <firstname.lastname@example.org>:
> 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
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?
More information about the Newlib