1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

crucible: add ioctl_iflags_set to complement ioctl_iflags_get

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2017-09-16 14:29:42 -04:00
parent 088cbd24ff
commit 5f18fcda52
2 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,7 @@ namespace crucible {
};
int ioctl_iflags_get(int fd);
void ioctl_iflags_set(int fd, int attr);
string st_mode_ntoa(mode_t mode);

View File

@ -496,6 +496,12 @@ namespace crucible {
return attr;
}
void
ioctl_iflags_set(int fd, int attr)
{
DIE_IF_MINUS_ONE(ioctl(fd, FS_IOC_SETFLAGS, &attr));
}
string
readlink_or_die(const string &path)
{