Skip to content

Commit

Permalink
Add missing write flags
Browse files Browse the repository at this point in the history
  • Loading branch information
golemparts committed Oct 3, 2023
1 parent 9ad1277 commit 883b3d1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/gpio/ioctl/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ const SIZE_LINE_CONFIG: IoctlLong = (mem::size_of::<LineConfig>() as IoctlLong)
const SIZE_LINE_VALUES: IoctlLong = (mem::size_of::<LineValues>() as IoctlLong) << SHIFT_SIZE;

const REQ_GET_CHIP_INFO: IoctlLong = DIR_READ | TYPE_GPIO | NR_GET_CHIP_INFO | SIZE_CHIP_INFO;
const REQ_GET_LINE_INFO: IoctlLong = DIR_READ | TYPE_GPIO | NR_GET_LINE_INFO | SIZE_LINE_INFO;
const REQ_GET_LINE_INFO: IoctlLong = DIR_READ_WRITE | TYPE_GPIO | NR_GET_LINE_INFO | SIZE_LINE_INFO;
const REQ_GET_LINE_INFO_WATCH: IoctlLong =
DIR_READ | TYPE_GPIO | NR_GET_LINE_INFO_WATCH | SIZE_LINE_INFO;
DIR_READ_WRITE | TYPE_GPIO | NR_GET_LINE_INFO_WATCH | SIZE_LINE_INFO;
const REQ_GET_LINE_INFO_UNWATCH: IoctlLong =
DIR_READ | TYPE_GPIO | NR_GET_LINE_INFO_UNWATCH | SIZE_U32;
const REQ_GET_LINE: IoctlLong = DIR_READ | TYPE_GPIO | NR_GET_LINE | SIZE_LINE_REQUEST;
const REQ_LINE_SET_CONFIG: IoctlLong = DIR_READ | TYPE_GPIO | NR_LINE_SET_CONFIG | SIZE_LINE_CONFIG;
const REQ_LINE_GET_VALUES: IoctlLong = DIR_READ | TYPE_GPIO | NR_LINE_GET_VALUES | SIZE_LINE_VALUES;
const REQ_LINE_SET_VALUES: IoctlLong = DIR_READ | TYPE_GPIO | NR_LINE_SET_VALUES | SIZE_LINE_VALUES;
DIR_READ_WRITE | TYPE_GPIO | NR_GET_LINE_INFO_UNWATCH | SIZE_U32;
const REQ_GET_LINE: IoctlLong = DIR_READ_WRITE | TYPE_GPIO | NR_GET_LINE | SIZE_LINE_REQUEST;
const REQ_LINE_SET_CONFIG: IoctlLong =
DIR_READ_WRITE | TYPE_GPIO | NR_LINE_SET_CONFIG | SIZE_LINE_CONFIG;
const REQ_LINE_GET_VALUES: IoctlLong =
DIR_READ_WRITE | TYPE_GPIO | NR_LINE_GET_VALUES | SIZE_LINE_VALUES;
const REQ_LINE_SET_VALUES: IoctlLong =
DIR_READ_WRITE | TYPE_GPIO | NR_LINE_SET_VALUES | SIZE_LINE_VALUES;

// Maximum name and label length.
const NAME_BUFSIZE: usize = 32;
Expand Down

0 comments on commit 883b3d1

Please sign in to comment.