We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c89a67 commit ac099c8Copy full SHA for ac099c8
src/mbpfan.c
@@ -376,7 +376,10 @@ void set_fan_speed(t_fans* fans, int speed)
376
if(tmp->file != NULL) {
377
char buf[16];
378
int len = snprintf(buf, sizeof(buf), "%d", speed);
379
- pwrite(fileno(tmp->file), buf, len, /*offset=*/ 0);
+ int res = pwrite(fileno(tmp->file), buf, len, /*offset=*/ 0);
380
+ if (res == -1) {
381
+ perror("Could not set fan speed");
382
+ }
383
}
384
385
tmp = tmp->next;
0 commit comments