*/
#ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.55 1999/03/24 05:05:24 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.57 1999/04/12 06:24:47 paulus Exp $";
#endif
#include <ctype.h>
bool notty = 0; /* Stdin/out is not a tty */
char *record_file = NULL; /* File to record chars sent/received */
int using_pty = 0;
+bool sync_serial = 0; /* Device is synchronous serial device */
extern option_t auth_options[];
"Show brief listing of options" },
{ "-h", o_special_noarg, showhelp,
"Show brief listing of options" },
+ { "sync", o_bool, &sync_serial,
+ "Use synchronous HDLC serial encoding", 1 },
#ifdef PPP_FILTER
{ "pdebug", o_int, &dflag,
int priv;
{
FILE *f;
- int i, newline, ret;
+ int i, newline, ret, err;
option_t *opt;
int oldpriv;
char *oldsource;
if (check_prot)
seteuid(getuid());
f = fopen(filename, "r");
+ err = errno;
if (check_prot)
seteuid(0);
if (f == NULL) {
- if (!must_exist && errno == ENOENT)
+ if (!must_exist && err == ENOENT)
return 1;
+ errno = err;
option_error("Can't open options file %s: %m", filename);
return 0;
}