dockapps/wmppp.app/getmodemspeed.c
Doug Torrance 9d8970e27a wmppp.app: Move source files to top directory.
This way, users need only type "make" to build instead of needing to
"cd wmppp" first.
2015-05-20 10:44:41 +01:00

18 lines
243 B
C

#include <stdio.h>
int main(void) {
FILE *fd;
char temp[256];
fd = popen("tac /etc/ppp/connect-errors | grep '['CONNECT'|'CARRIER']' | head -1", "r");
while (fgets(temp, 256, fd)) {
printf("%s", temp);
}
pclose(fd);
return 0;
}