From owner-freebsd-bugs Fri Mar 29 0:40:36 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1C0BF37B41C for ; Fri, 29 Mar 2002 00:40:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2T8e5750813; Fri, 29 Mar 2002 00:40:05 -0800 (PST) (envelope-from gnats) Date: Fri, 29 Mar 2002 00:40:05 -0800 (PST) Message-Id: <200203290840.g2T8e5750813@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Forrest W. Christian" Subject: Re: bin/36418: pccardd added option to exit after probe Reply-To: "Forrest W. Christian" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/36418; it has been noted by GNATS. From: "Forrest W. Christian" To: Peter Pentchev Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: bin/36418: pccardd added option to exit after probe Date: Fri, 29 Mar 2002 02:34:59 +0000 (GMT) Revised Patches below.... - Forrest W. Christian (forrestc@imach.com) AC7DE ---------------------------------------------------------------------- --- /usr/src/usr.sbin/pccard/pccardd/pccardd.c Tue Sep 4 20:51:36 2001 +++ pccardd.c Thu Mar 28 01:33:51 2002 @@ -156,12 +156,13 @@ { struct slot *sp; int count, dodebug = 0; + int probeonly = 0; int delay = 0; int irq_arg[16]; int irq_specified = 0; int i; struct sockaddr_un sun; -#define COM_OPTS ":Idvf:s:i:z" +#define COM_OPTS ":Idvf:s:i:zx" bzero(irq_arg, sizeof(irq_arg)); use_kern_irq = 1; @@ -196,6 +197,9 @@ case 's': sock = optarg; break; + case 'x': + probeonly = 1; + break; case 'z': delay = 1; break; @@ -224,12 +228,14 @@ if (doverbose) dump_config_file(); log_setup(); - if (!dodebug && !delay) + if (!dodebug && !delay && !probeonly) if (daemon(0, 0)) die("fork failed"); slots = readslots(); if (slots == 0) die("no PC-CARD slots"); + if (probeonly) + exit(0); if (delay) if (daemon(0, 0)) die("fork failed"); --- /usr/src/usr.sbin/pccard/pccardd/pccardd.8 Tue Sep 4 20:51:30 2001 +++ pccardd.8 Thu Mar 28 01:31:28 2002 @@ -35,6 +35,7 @@ .Nm .Op Fl d .Op Fl v +.Op Fl x .Op Fl z .Op Fl i Ar IRQ .Op Fl I @@ -134,6 +135,14 @@ .It Fl v After reading the configuration file, print out a summary of it. +.It Fl x +Exits immediately after the cards have been probed and attached. +This is primarily useful in embedded applications where it is +desirable to use +.Nm +to start PC-CARD devices but prohibitive memory-wise to leave the +.Nm +process running. .It Fl z Delays running as a daemon until after the cards have been probed and attached. .It Fl I To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message