diff options
author | nate <nate@FreeBSD.org> | 1996-06-17 22:14:19 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1996-06-17 22:14:19 +0000 |
commit | 1daa2fff752565c597a573c66c7b03d9807664e4 (patch) | |
tree | 1b030ab95f0cb7613aaf64a653f2a8ee460ccb49 /usr.sbin | |
parent | d1a982548c6c45f5b547c222ac35713b8c3d4e06 (diff) | |
download | FreeBSD-src-1daa2fff752565c597a573c66c7b03d9807664e4.zip FreeBSD-src-1daa2fff752565c597a573c66c7b03d9807664e4.tar.gz |
Use the defined path to the card devices instead of hard-coding it's
value in every file.
No functional changes.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pccard/pccardc/dumpcis.c | 4 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/enabler.c | 4 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/pccardmem.c | 8 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/rdmap.c | 4 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/rdreg.c | 4 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/wrattr.c | 4 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/wrreg.c | 4 |
7 files changed, 17 insertions, 15 deletions
diff --git a/usr.sbin/pccard/pccardc/dumpcis.c b/usr.sbin/pccard/pccardc/dumpcis.c index 123f753..4a1fb37 100644 --- a/usr.sbin/pccard/pccardc/dumpcis.c +++ b/usr.sbin/pccard/pccardc/dumpcis.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: dumpcis.c,v 1.3 1996/04/10 05:45:30 nate Exp $ + * $Id: dumpcis.c,v 1.4 1996/04/18 04:24:52 nate Exp $ */ #include <stdio.h> #include <unistd.h> @@ -47,7 +47,7 @@ scan(slot) struct cis *cp; struct slotstate st; - sprintf(name, "/dev/card%d", slot); + sprintf(name, CARD_DEVICE, slot); fd = open(name, 0); if (fd < 0) return; diff --git a/usr.sbin/pccard/pccardc/enabler.c b/usr.sbin/pccard/pccardc/enabler.c index 589b838..3a08669 100644 --- a/usr.sbin/pccard/pccardc/enabler.c +++ b/usr.sbin/pccard/pccardc/enabler.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: enabler.c,v 1.4 1996/04/18 04:24:53 nate Exp $ */ #include <stdio.h> #include <unistd.h> @@ -97,7 +97,7 @@ enabler_main(argc, argv) printf("drv %s%d, mem 0x%lx, size %d, io %d, irq 0x%x, flags 0x%x\n", drv.name, drv.unit, drv.mem, drv.memsize, drv.iobase, drv.irqmask, drv.flags); - sprintf(name, "/dev/card%d", slot); + sprintf(name, CARD_DEVICE, slot); fd = open(name, 2); if (fd < 0) { perror(name); diff --git a/usr.sbin/pccard/pccardc/pccardmem.c b/usr.sbin/pccard/pccardc/pccardmem.c index e9d26e0..e11e047 100644 --- a/usr.sbin/pccard/pccardc/pccardmem.c +++ b/usr.sbin/pccard/pccardc/pccardmem.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: pccardmem.c,v 1.4 1996/04/18 04:24:54 nate Exp $ */ #include <stdio.h> #include <fcntl.h> @@ -37,6 +37,7 @@ pccardmem_main(argc, argv) int argc; char *argv[]; { + char name[64]; int addr = 0; int fd; @@ -44,9 +45,10 @@ pccardmem_main(argc, argv) fprintf(stderr, "usage: %s [ memory-address ]\n", argv[0]); exit(1); } - fd = open("/dev/card0", 0); + sprintf(name, CARD_DEVICE, 0); + fd = open(name, 0); if (fd < 0) { - perror("/dev/card0"); + perror(name); exit(1); } if (argc == 2) { diff --git a/usr.sbin/pccard/pccardc/rdmap.c b/usr.sbin/pccard/pccardc/rdmap.c index 4a74fff..fa375f5 100644 --- a/usr.sbin/pccard/pccardc/rdmap.c +++ b/usr.sbin/pccard/pccardc/rdmap.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: rdmap.c,v 1.4 1996/04/18 04:24:56 nate Exp $ */ #include <stdio.h> #include <unistd.h> @@ -73,7 +73,7 @@ scan(slot) char name[64]; struct slotstate st; - sprintf(name, "/dev/card%d", slot); + sprintf(name, CARD_DEVICE, slot); fd = open(name, 0); if (fd < 0) return; diff --git a/usr.sbin/pccard/pccardc/rdreg.c b/usr.sbin/pccard/pccardc/rdreg.c index 2d022af..49285f4 100644 --- a/usr.sbin/pccard/pccardc/rdreg.c +++ b/usr.sbin/pccard/pccardc/rdreg.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: rdreg.c,v 1.4 1996/04/18 04:24:56 nate Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -41,7 +41,7 @@ dumpslot(sl) int fd; struct pcic_reg r; - sprintf(name, "/dev/card%d", sl); + sprintf(name, CARD_DEVICE, sl); fd = open(name, 2); if (fd < 0) { perror(name); diff --git a/usr.sbin/pccard/pccardc/wrattr.c b/usr.sbin/pccard/pccardc/wrattr.c index 20ec9f5..7577fdd 100644 --- a/usr.sbin/pccard/pccardc/wrattr.c +++ b/usr.sbin/pccard/pccardc/wrattr.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wrattr.c,v 1.4 1996/04/18 04:24:57 nate Exp $ + * $Id: wrattr.c,v 1.5 1996/04/18 05:23:47 nate Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -48,7 +48,7 @@ wrattr_main(argc, argv) fprintf(stderr, "usage: %s wrattr slot offs value\n", argv[0]); exit(1); } - sprintf(name, "/dev/card%d", atoi(argv[1])); + sprintf(name, CARD_DEVICE, atoi(argv[1])); fd = open(name, 2); if (fd < 0) { perror(name); diff --git a/usr.sbin/pccard/pccardc/wrreg.c b/usr.sbin/pccard/pccardc/wrreg.c index 7db02fb..4c0bc7e 100644 --- a/usr.sbin/pccard/pccardc/wrreg.c +++ b/usr.sbin/pccard/pccardc/wrreg.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: wrreg.c,v 1.4 1996/04/18 04:24:58 nate Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -48,7 +48,7 @@ wrreg_main(argc, argv) fprintf(stderr, "usage: wrreg slot reg value\n"); exit(1); } - sprintf(name, "/dev/card%d", atoi(argv[1])); + sprintf(name, CARD_DEVICE, atoi(argv[1])); fd = open(name, 2); if (fd < 0) { perror(name); |