![]() |
ckb-next
beta-v0.2.8 at branch testing
ckb-next driver for corsair devices
|
Include dependency graph for devnode.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | S_READDIR (S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) |
| #define | S_READ (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR) |
| #define | S_READWRITE (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH) |
| #define | S_CUSTOM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) |
| #define | S_CUSTOM_R (S_IRUSR | S_IWUSR | S_IRGRP) |
Typedefs | |
| typedef struct _readlines_ctx * | readlines_ctx |
| Custom readline is needed for FIFOs. fopen()/getline() will die if the data is sent in too fast. More... | |
Functions | |
| void | updateconnected () |
| Update the list of connected devices. More... | |
| int | mkdevpath (usbdevice *kb) |
| Create a dev path for the keyboard at index. Returns 0 on success. More... | |
| int | rmdevpath (usbdevice *kb) |
| Remove the dev path for the keyboard at index. Returns 0 on success. More... | |
| int | mknotifynode (usbdevice *kb, int notify) |
| Creates a notification node for the specified keyboard. More... | |
| int | rmnotifynode (usbdevice *kb, int notify) |
| Removes a notification node for the specified keyboard. More... | |
| int | mkfwnode (usbdevice *kb) |
| Writes a keyboard's firmware version and poll rate to its device node. More... | |
| void | readlines_ctx_init (readlines_ctx *ctx) |
| void | readlines_ctx_free (readlines_ctx ctx) |
| unsigned | readlines (int fd, readlines_ctx ctx, const char **input) |
Variables | |
| const char *const | devpath |
| Device path base ("/dev/input/ckb" or "/var/run/ckb") More... | |
| long | gid |
| Group ID for the control nodes. -1 to give read/write access to everybody. More... | |
| #define S_CUSTOM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) |
Definition at line 17 of file devnode.h.
Referenced by _mkdevpath().
| #define S_READ (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR) |
Definition at line 15 of file devnode.h.
Referenced by _mkdevpath().
| #define S_READDIR (S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) |
Definition at line 14 of file devnode.h.
Referenced by _mkdevpath().
| #define S_READWRITE (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH) |
Definition at line 16 of file devnode.h.
Referenced by _mkdevpath().
| typedef struct _readlines_ctx* readlines_ctx |
| int mkdevpath | ( | usbdevice * | kb | ) |
Definition at line 268 of file devnode.c.
References _mkdevpath(), euid_guard_start, and euid_guard_stop.
Referenced by _setupusb(), and main().
Here is the call graph for this function:
Here is the caller graph for this function:| int mkfwnode | ( | usbdevice * | kb | ) |
Definition at line 299 of file devnode.c.
References ckb_warn, devpath, usbdevice::fwversion, gid, INDEX_OF, keyboard, usbdevice::pollrate, and S_GID_READ.
Referenced by _mkdevpath(), and fwupdate().
Here is the caller graph for this function:| int mknotifynode | ( | usbdevice * | kb, |
| int | notify | ||
| ) |
Definition at line 108 of file devnode.c.
References _mknotifynode(), euid_guard_start, and euid_guard_stop.
Referenced by readcmd().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned readlines | ( | int | fd, |
| readlines_ctx | ctx, | ||
| const char ** | input | ||
| ) |
Definition at line 353 of file devnode.c.
References _readlines_ctx::buffer, _readlines_ctx::buffersize, ckb_warn, _readlines_ctx::leftover, _readlines_ctx::leftoverlen, and MAX_BUFFER.
Referenced by devmain().
Here is the caller graph for this function:| void readlines_ctx_free | ( | readlines_ctx | ctx | ) |
Definition at line 348 of file devnode.c.
References _readlines_ctx::buffer.
Referenced by devmain().
Here is the caller graph for this function:| void readlines_ctx_init | ( | readlines_ctx * | ctx | ) |
Definition at line 341 of file devnode.c.
Referenced by devmain().
Here is the caller graph for this function:| int rmdevpath | ( | usbdevice * | kb | ) |
Definition at line 275 of file devnode.c.
References _rmnotifynode(), ckb_info, ckb_warn, devpath, euid_guard_start, euid_guard_stop, INDEX_OF, usbdevice::infifo, keyboard, OUTFIFO_MAX, and rm_recursive().
Referenced by closeusb(), and quitWithLock().
Here is the call graph for this function:
Here is the caller graph for this function:| int rmnotifynode | ( | usbdevice * | kb, |
| int | notify | ||
| ) |
Definition at line 129 of file devnode.c.
References _rmnotifynode(), euid_guard_start, and euid_guard_stop.
Referenced by readcmd().
Here is the call graph for this function:
Here is the caller graph for this function:| void updateconnected | ( | ) |
Definition at line 81 of file devnode.c.
References _updateconnected(), euid_guard_start, and euid_guard_stop.
Referenced by _setupusb(), and closeusb().
Here is the call graph for this function:
Here is the caller graph for this function:| long gid |
Definition at line 16 of file devnode.c.
Referenced by _mkdevpath(), _mknotifynode(), _updateconnected(), main(), and mkfwnode().