diff options
author | Hamish Moffatt <hamish@cloud.net.au> | 2001-09-11 12:01:10 +0000 |
---|---|---|
committer | Hamish Moffatt <hamish@cloud.net.au> | 2001-09-11 12:01:10 +0000 |
commit | b24740e66f03996c6bc2bb2f0832e82ec9f3be29 (patch) | |
tree | ad1d1d9925a352488b6966417ff630fd1444b541 /rsconfig.c | |
parent | ee3367004040be124c754d07e4977ea6dbbc9880 (diff) |
Added better error messages in libax25, eg to print out the names
of missing files etc.
Diffstat (limited to 'rsconfig.c')
-rw-r--r-- | rsconfig.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -175,11 +175,11 @@ static int rs_config_init_port(int fd, int lineno, char *line) for (p = rs_ports; p != NULL; p = p->Next) { if (strcasecmp(name, p->Name) == 0) { - fprintf(stderr, "rsconfig: duplicate port name in line %d of config file\n", lineno); + fprintf(stderr, "rsconfig: duplicate port name %s in line %d of config file\n", name, lineno); return FALSE; } if (strcasecmp(addr, p->Addr) == 0) { - fprintf(stderr, "rsconfig: duplicate address in line %d of config file\n", lineno); + fprintf(stderr, "rsconfig: duplicate address %s in line %d of config file\n", addr, lineno); return FALSE; } } @@ -252,12 +252,12 @@ int rs_config_load_ports(void) int fd, lineno = 1, n = 0; if ((fp = fopen(CONF_RSPORTS_FILE, "r")) == NULL) { - fprintf(stderr, "rsconfig: unable to open rsports file\n"); + fprintf(stderr, "rsconfig: unable to open rsports file %s (%s)\n", CONF_RSPORTS_FILE, strerror(errno)); return 0; } if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - fprintf(stderr, "rsconfig: unable to open socket\n"); + fprintf(stderr, "rsconfig: unable to open socket (%s)\n", strerror(errno)); fclose(fp); return 0; } |