/*
* Scan /dev and find the device name.
*/
-static int findtty(char *res, int rlen, dev_t dev)
+static int findtty(char *res, const char *startdir, int rlen, dev_t dev)
{
DIR *dir;
struct dirent *ent;
break;
case '\n':
didnl = 1;
- dosync = syncalot;
+ dosync = 1;
break;
case '\t':
line.pos += (line.pos / 8 + 1) * 8;
if (dosync) {
fflush(fp);
- fdatasync(fileno(fp));
+ if (syncalot) {
+ fdatasync(fileno(fp));
+ }
}
outptr += olen;