Date: Fri, 23 Nov 2001 11:44:05 +0100 (CET) From: Leif Neland <leifn@neland.dk> To: <freebsd-isdn@FreeBSD.ORG> Subject: isdnd -P : why initialize hw etc? Message-ID: <20011123105454.G12686-100000@arnold.neland.dk> In-Reply-To: <20001126154033.45CF83E8@hcswork.hcs.de>
next in thread | previous in thread | raw e-mail | index | archive | help
I looked at isdnd/main.c, and I wonder why isdnd -P try to connect to hw, why does it do more than parse the config-file, print it and exit? Is it nessecary to run this: check_pid(); /* check if we are already running */ /* open isdn device */ if((isdnfd = open(I4BDEVICE, O_RDWR)) < 0) { log(LL_ERR, "main: cannot open %s: %s", I4BDEVICE, strerror(errno)); exit(1); } /* check kernel and userland have same version/release numbers */ if((ioctl(isdnfd, I4B_VR_REQ, &mvr)) < 0) { log(LL_ERR, "main: ioctl I4B_VR_REQ failed: %s", strerror(errno)); do_exit(1); } if(mvr.version != VERSION) { log(LL_ERR, "main: version mismatch, kernel %d, daemon %d", mvr.version, VERSION); do_exit(1); } if(mvr.release != REL) { log(LL_ERR, "main: release mismatch, kernel %d, daemon %d", mvr.release, REL); do_exit(1); } if(mvr.step != STEP) { log(LL_ERR, "main: step mismatch, kernel %d, daemon %d", mvr.step, STEP); do_exit(1); } /* init controller state array */ init_controller(); /* read runtime configuration file and configure ourselves */ If -P is set, configure never returns, but isdnd terminates. configure(configfile, 0); Why not put all the above statements in a "if (!do_print)" ? The obvious answer is "try it", but then isdnd dies with segmentation fault when rc_config calls yyparse. I can't find this function. Leif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011123105454.G12686-100000>