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/pccard/pccardc/pccardmem.c | |
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/pccard/pccardc/pccardmem.c')
-rw-r--r-- | usr.sbin/pccard/pccardc/pccardmem.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) { |