summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard/pccardc/pccardmem.c
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-06-17 22:14:19 +0000
committernate <nate@FreeBSD.org>1996-06-17 22:14:19 +0000
commit1daa2fff752565c597a573c66c7b03d9807664e4 (patch)
tree1b030ab95f0cb7613aaf64a653f2a8ee460ccb49 /usr.sbin/pccard/pccardc/pccardmem.c
parentd1a982548c6c45f5b547c222ac35713b8c3d4e06 (diff)
downloadFreeBSD-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.c8
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) {
OpenPOWER on IntegriCloud