Re: Gnome Pilot Causing USB Drive problems (version 2.0.10)
- From: Nigel Metheringham <Nigel Metheringham dev intechnology co uk>
- To: "The PalmOS< tm> integration pacakge" <gnome-pilot-list gnome org>
- Subject: Re: Gnome Pilot Causing USB Drive problems (version 2.0.10)
- Date: Wed, 08 Sep 2004 14:30:36 +0100
On Wed, 2004-09-08 at 09:23 -0400, Jason 'vanRijn' Kasper wrote:
> yes, please post your script! =:)
OK - its nothing elegant, but you can see what its doing. The logic to
print dots to stdout while running is almost as complex as the main
payload...
Copied inline since I don't know how this list handles MIME attachments.
-=- SNIP
#!/usr/bin/perl
#
use strict;
use IO::File;
use IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP);
local $| = 1;
my $count;
my $nfh = IO::File->new('/dev/null', 'r');
my $poll = IO::Poll->new();
$poll->mask($nfh => POLLIN);
while (1) {
$poll->poll(500);
my $fh = IO::File->new('/proc/bus/usb/devices', 'r') || die $!;
my @stat = stat $fh;
print ".";
if ($count++ > 60) {
print "\n";
$count = 0;
}
while (<$fh>) {
# nothing
chomp;
}
}
-=- SNIP
Nigel.
--
[ Nigel Metheringham Nigel Metheringham InTechnology co uk ]
[ - Comments in this message are my own and not ITO opinion/policy - ]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]