summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-09-29 23:00:11 +0000
committerimp <imp@FreeBSD.org>2002-09-29 23:00:11 +0000
commitfd3bf3a3649e4b1ff87968fb88c10ded316d0c01 (patch)
tree6a12e627047bb40310921bc067af11998cfe3840 /usr.sbin/pccard
parentb03c6fa4935f6ff4ab39b2cb4373f0e163d04c15 (diff)
downloadFreeBSD-src-fd3bf3a3649e4b1ff87968fb88c10ded316d0c01.zip
FreeBSD-src-fd3bf3a3649e4b1ff87968fb88c10ded316d0c01.tar.gz
Add -x option. This causes pccardd to exit after probing the cards. This
is useful for low memory systems. PR: 36418 Submitted by: Forrest W. Christian
Diffstat (limited to 'usr.sbin/pccard')
-rw-r--r--usr.sbin/pccard/pccardd/pccardd.89
-rw-r--r--usr.sbin/pccard/pccardd/pccardd.c7
2 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/pccard/pccardd/pccardd.8 b/usr.sbin/pccard/pccardd/pccardd.8
index 71523d4..33e3a3a 100644
--- a/usr.sbin/pccard/pccardd/pccardd.8
+++ b/usr.sbin/pccard/pccardd/pccardd.8
@@ -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
@@ -137,6 +138,14 @@ display error messages.
.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
diff --git a/usr.sbin/pccard/pccardd/pccardd.c b/usr.sbin/pccard/pccardd/pccardd.c
index ba70336..1b18b78 100644
--- a/usr.sbin/pccard/pccardd/pccardd.c
+++ b/usr.sbin/pccard/pccardd/pccardd.c
@@ -156,12 +156,13 @@ main(int argc, char *argv[])
{
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 ":Idf:i:s:vxz"
bzero(irq_arg, sizeof(irq_arg));
use_kern_irq = 1;
@@ -224,12 +225,14 @@ main(int argc, char *argv[])
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");
OpenPOWER on IntegriCloud