It appears that open() will not fail if for some reason the device does not go into the connected state. This patch checks for that. ---
These patches are from studying the code, so far, and therefore untested, except for a compile check on 2.6.26.5. - Chris kernel/init.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/init.c b/kernel/init.c index 2b068e8..3ef29ad 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -352,7 +352,8 @@ struct blackberry_device *blackberry_device = tty ? device_map[tty->index].black wait_event_interruptible(blackberry_device->desktop.open_wait, (blackberry_device->desktop.connected == 1)); } } - else + + if (blackberry_device->desktop.socket <= 0 || blackberry_device->desktop.connected != 1) { ret = -ENODEV; err("%s(%d) - %08x Desktop not available", __FUNCTION__, __LINE__, -- 1.6.0.3 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel