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
This commit is contained in:
parent
b03c6fa493
commit
fd3bf3a364
@ -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
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user