diff options
author | hosokawa <hosokawa@FreeBSD.org> | 2000-01-16 06:44:48 +0000 |
---|---|---|
committer | hosokawa <hosokawa@FreeBSD.org> | 2000-01-16 06:44:48 +0000 |
commit | 721d34c8d9cc1ca1480315326ea71269f671217d (patch) | |
tree | 10b960c7cc7e3fbf82a53de66e0c8b428cbbd6ab /sys/pccard/pccard.c | |
parent | b0d0e9404a1f0c003f8cc2e5860cf6c551000367 (diff) | |
download | FreeBSD-src-721d34c8d9cc1ca1480315326ea71269f671217d.zip FreeBSD-src-721d34c8d9cc1ca1480315326ea71269f671217d.tar.gz |
This fixes a bug that /etc/pccard_ether did not work without DHCP.
For example, when /etc/pccard.conf had ed0 in config line, but kernel
refused this name and said
devclass_alloc_unit: ed0 already exists, using next availale unit
number
Kernel used ed1 as device name and it did not match with config and
insert/remove lines. Fortunately, dhclient was called without args,
and it works, but if we wanted to use static IP address for PC-card,
it did not work.
This modification makes pccardd to execute insert/remove lines with
the true device name that returns from kernel. (Last change to
etc/pccard.conf.sample eliminated all hardwired device name from
insert/remove lines in /etc/pccard.conf)
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r-- | sys/pccard/pccard.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 9b4a61d..abc1195 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -278,6 +278,8 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) goto err; } err = device_probe_and_attach(child); + snprintf(desc->name, sizeof(desc->name), "%s", + device_get_nameunit(child)); err: if (err) device_delete_child(pccarddev, child); |