MCPcopy Create free account
hub / github.com/ccMSC/ckb / _rmnotifynode

Function _rmnotifynode

src/ckb-daemon/devnode.c:98–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98int _rmnotifynode(usbdevice* kb, int notify){
99 if(notify < 0 || notify >= OUTFIFO_MAX || !kb->outfifo[notify])
100 return -1;
101 int index = INDEX_OF(kb, keyboard);
102 char outpath[strlen(devpath) + 10];
103 snprintf(outpath, sizeof(outpath), "%s%d/notify%d", devpath, index, notify);
104 // Close FIFO
105 close(kb->outfifo[notify] - 1);
106 kb->outfifo[notify] = 0;
107 // Delete node
108 int res = remove(outpath);
109 return res;
110}
111
112int rmnotifynode(usbdevice* kb, int notify){
113 euid_guard_start;

Callers 2

rmnotifynodeFunction · 0.85
rmdevpathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected