- controlapi: fix perror message

This commit is contained in:
svenhoefer
2017-02-22 15:25:04 +01:00
parent 056b47c09b
commit 7c2e25103f

View File

@@ -882,8 +882,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
#endif
int evd = open(EVENTDEV, O_RDWR);
if (evd < 0) {
perror("opening " EVENTDEV " failed");
hh->SendError();
perror("opening event0 failed");
return;
}
if (rc_send(evd, sendcode, KEY_PRESSED) < 0) {
@@ -894,8 +894,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
}
if (rc_send(evd, sendcode, KEY_RELEASED) < 0) {
perror("writing 'KEY_RELEASED' event failed");
close(evd);
hh->SendError();
close(evd);
return;
}
close(evd);