Displaying 2 results from an estimated 2 matches for "belkin_std_upsread".
2005 Nov 08
0
gcc4 noise
...2 of ser_send_buf differ in signedness
belkinunv.c: In function belkin_nut_write_int:
belkinunv.c:396: warning: pointer targets in passing argument 2 of ser_send_buf differ in signedness
belkinunv.c: In function belkin_std_receive:
belkinunv.c:571: warning: pointer targets in passing argument 2 of belkin_std_upsread differ in signedness
belkinunv.c:581: warning: pointer targets in passing argument 2 of belkin_std_upsread differ in signedness
belkinunv.c:593: warning: pointer targets in passing argument 2 of belkin_std_upsread differ in signedness
belkinunv.c: In function belkin_std_read_int:
belkinunv.c:620: w...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...elkin's own
software sleeps 1 second, so that's what we do, too. */
- usleep(1000000);
+ struct timespec delay = {1, 0}; nanosleep(&delay, NULL);
/* flush incoming data again, and read any remaining garbage
bytes. There should not be any. */
@@ -526,7 +526,7 @@ static int belkin_std_upsread(int fd, un
r = read(fd, &buf[count], n-count);
if (r==-1 && errno==EAGAIN) {
/* non-blocking i/o, no data available */
- usleep(100000);
+ struct timespec delay = {0, 100e6}; nanosleep(&delay, NULL);
tries++;
} else if (r == -1) {
return -1;
@@ -550,7 +550,...