From 88a859acabb54c1cdf6937d8ef79e65a4a039e40 Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Tue, 6 Nov 2007 20:15:52 +0000 Subject: [PATCH] [ 1194141 ] better diagnostics for opening ppdev device git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@707 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/src/tap/parport/ppdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jtag/src/tap/parport/ppdev.c b/jtag/src/tap/parport/ppdev.c index b6c3446b..3eb91f76 100644 --- a/jtag/src/tap/parport/ppdev.c +++ b/jtag/src/tap/parport/ppdev.c @@ -34,6 +34,7 @@ #include #include +#include #include #include "parport.h" @@ -161,10 +162,13 @@ ppdev_open( parport_t *parport ) ppdev_params_t *p = parport->params; p->fd = open( p->portname, O_RDWR ); - if (p->fd < 0) + if (p->fd < 0) { + printf( _("Could not open port %s: %s\n"), p->portname, strerror(errno) ); return -1; + } if ((ioctl( p->fd, PPEXCL ) == -1) || (ioctl( p->fd, PPCLAIM ) == -1)) { + printf( _("Could not claim ppdev device: %s\n"), strerror(errno) ); close( p->fd ); p->fd = -1; return -1;