Skip to content

Commit

Permalink
posix: Implement fdetach and fattach
Browse files Browse the repository at this point in the history
`fdetach()` and `fattach()` are required
as part of _XOPEN_STREAMS Option Group.

signed-off-by: Gaetan Perrot <[email protected]>
  • Loading branch information
moonlight83340 authored and fabiobaltieri committed Feb 26, 2024
1 parent dd7caf6 commit cd060f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/zephyr/posix/stropts.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ struct strbuf {
};

int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags);
int fdetach(const char *path);
int fattach(int fildes, const char *path);

#ifdef __cplusplus
}
Expand Down
17 changes: 17 additions & 0 deletions lib/posix/options/stropts.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,20 @@ int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr
errno = ENOSYS;
return -1;
}

int fdetach(const char *path)
{
ARG_UNUSED(path);

errno = ENOSYS;
return -1;
}

int fattach(int fildes, const char *path)
{
ARG_UNUSED(fildes);
ARG_UNUSED(path);

errno = ENOSYS;
return -1;
}

0 comments on commit cd060f6

Please sign in to comment.