# Re: Does it make sense to define a constant for openat and such that is guaranteed not to be used for special purposes later on?

- From: Andy Lutomirski \<hidden\>
- Date: 2014-06-30 22:08:10 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2014/06/13328948
- Thread: https://ratatoskr.run/linux-api/2014/06/13328948/t.md

```text
On Sat, Jun 28, 2014 at 12:16 PM, Steven Stewart-Gallus
[ref] wrote:
> Hello,
>
> For system calls such as openat I might wish to use the value -1 for
> the directory file descriptor parameter to indicate that a path passed
> in must be an absolute path. However, it has occurred to me that such
> a usage isn't defined by POSIX and isn't safe for the future. In the
> future -1 may be taken to be used for some other special purpose. I
> would like a solution for that problem.
>
> It'd be nice if we could define a constant (maybe call it AT_FDNODIR)
> to maybe -1 that is set aside to mean that no directory is to be used
> and that will not ever be ever used for some other purpose in the
> future.

I like this.  Want to submit a patch?

--Andy
```
