aboutsummaryrefslogtreecommitdiffstats
path: root/drv_generic_parport.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2005-06-13 03:38:25 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2005-06-13 03:38:25 +0000
commit1e69d7efc4e0a8886002776a8dbb9299b7e0b0f3 (patch)
treeb70a001a1aeb15c1ad35ea0d5632697939bee836 /drv_generic_parport.c
parentdf46d2a634b177d524761675313f7e070ef47102 (diff)
downloadlcd4linux-1e69d7efc4e0a8886002776a8dbb9299b7e0b0f3.tar.gz
[lcd4linux @ 2005-06-13 03:38:25 by reinelt]
try PPEXCL again, but ignore result git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@577 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_generic_parport.c')
-rw-r--r--drv_generic_parport.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drv_generic_parport.c b/drv_generic_parport.c
index bbc5cf0..091c1ed 100644
--- a/drv_generic_parport.c
+++ b/drv_generic_parport.c
@@ -1,4 +1,4 @@
-/* $Id: drv_generic_parport.c,v 1.16 2005/05/08 04:32:44 reinelt Exp $
+/* $Id: drv_generic_parport.c,v 1.17 2005/06/13 03:38:25 reinelt Exp $
*
* generic driver helper for serial and parport access
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_generic_parport.c,v $
+ * Revision 1.17 2005/06/13 03:38:25 reinelt
+ * try PPEXCL again, but ignore result
+ *
* Revision 1.16 2005/05/08 04:32:44 reinelt
* CodingStyle added and applied
*
@@ -201,14 +204,14 @@ int drv_generic_parport_open(const char *section, const char *driver)
error("%s: open(%s) failed: %s", Driver, PPdev, strerror(errno));
return -1;
}
-#if 0
- /* Fixme: this always fails here... */
+
+ /* PPEXCL fails if someone else uses the port (e.g. lp.ko) */
if (ioctl(PPfd, PPEXCL)) {
- debug("ioctl(%s, PPEXCL) failed: %s", PPdev, strerror(errno));
+ info("%s: ioctl(%s, PPEXCL) failed: %s", PPdev, Driver, strerror(errno));
+ info("%s: could not get exclusive access to %s.", Driver, PPdev);
} else {
- debug("ioctl(%s, PPEXCL) succeded.");
+ info("%s: got exclusive access to %s.", Driver, PPdev);
}
-#endif
if (ioctl(PPfd, PPCLAIM)) {
error("%s: ioctl(%s, PPCLAIM) failed: %d %s", Driver, PPdev, errno, strerror(errno));