AnsweredAssumed Answered

What is the reason for using the O_TMPFILE flag ?

Question asked by ncarrier on Mar 13, 2015
Latest reply on Mar 16, 2015 by ncarrier

Hello,

We, at Parrot, are planning to use iio for collecting the data from our various sensors, in our future products.

I am currently investigating on how and if the libiio will fit our needs. We think we will have to patch it slightly for that purpose, that's why I am using the current HEAD of the git repo's master branch.

But this version introduces a dependency on the O_TMPFILE flag, which has been introduced, IIRW, on linux 3.11.

The kernel version we use is 3.4 and it's not an option for us to change it.

 

So my question is, why this dependency has been introduced ? Is it possible to avoid it ?

I don't understand why the temporary file's fd (created in network.c:817 and stored in pdata->memfd) is useful.

Should not a simple buffer do the same work ?

Or aren't there other acceptable solutions more "old-kernel" friendly ?

 

Thank you in advance.

Outcomes