Skip to content

Commit

Permalink
autoargs: Add a prototype for fchmodat(3)
Browse files Browse the repository at this point in the history
It seems fchmodat() was added in POSIX 2008.  Add that to the prototype.

  int fchmodat(int dirfd, const char *pathname, oct_mode_t mode, int flags);

Signed-off-by: Namhyung Kim <[email protected]>
  • Loading branch information
namhyung committed Apr 24, 2024
1 parent a26f9d6 commit bc12225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions misc/prototypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ int lstat(const char *pathname, void *statbuf);

int chmod(const char *pathname, oct_mode_t mode);
int fchmod(int fd, oct_mode_t mode);
int fchmodat(int dirfd, const char *pathname, oct_mode_t mode, int flags);
void umask(oct_mode_t mask);

int creat(const char *file, oct_mode_t mode);
Expand Down
2 changes: 2 additions & 0 deletions utils/auto-args.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ static char *auto_args_list =
"lstat@arg1/s,arg2/p;"
"chmod@arg1/s,arg2/o;"
"fchmod@arg1/d32,arg2/o;"
"fchmodat@arg1/d32,arg2/s,arg3/o,arg4/d32;"
"umask@arg1/o;"
"creat@arg1/s,arg2/o;"
"creat64@arg1/s,arg2/o;"
Expand Down Expand Up @@ -451,6 +452,7 @@ static char *auto_retvals_list =
"lstat@retval/d32;"
"chmod@retval/d32;"
"fchmod@retval/d32;"
"fchmodat@retval/d32;"
"creat@retval/d32;"
"creat64@retval/d32;"
"isatty@retval/d32;"
Expand Down

0 comments on commit bc12225

Please sign in to comment.