EEXIST in iofunc_open_default; why?

Getting an EEXIST return code from iofunc_open_default(), and it’s
not listed as one of the return codes in the docs.

My question, “why?” How could the iofunc_open_default know which
files exist in my resource manager? :slight_smile:

Thanks,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Robert Krten <nospam83@parse.com> wrote:

Getting an EEXIST return code from iofunc_open_default(), and it’s
not listed as one of the return codes in the docs.
My question, “why?” How could the iofunc_open_default know which
files exist in my resource manager? > :slight_smile:

O_CREAT | O_EXCL

It can deduce the existence by ‘dattr’ and ‘attr’ … you must be
specifying a NULL dattr, which is taken to mean that attr already
exists, which conflicts with this combination of ioflags …

A proper resmgr must pass dattr based on the result of the name
lookup: NULL if found, non-NULL for the directory to create in
if not found.