[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] Re: coldsync 2.1, USB, & FreeBSD -- oops



Andrew Arensburger wrote:

>         Unfortunately, this test isn't terribly revealing: the shell
> handles 'echo foo', '< /dev/ugen0', and '> out', so I wouldn't be
> surprised if you'd get this output file even if the command as a whole
> failed.

well, the command *does* fail (I mean it gives me an error message and not "foo") if the visor is not currently attached to /dev/ugen0 by usbd; i.e., if the visor is not synching:

[using csh]
%rm out err
%(echo foo < /dev/ugen0 > out) >& err
%cat out
cat: out: No such file or directory
%cat err
/dev/ugen0: Device not configured

If the visor is trying to sync:

%rm out err
%(echo foo < /dev/ugen0 > out) >& err
%cat out
foo
%cat err
%
	[err was empty]

>         The interesting part would have been to see whether the
> '</dev/ugen0' succeeded, or whether it failed the same way that ColdSync
> does. So maybe this wasn't the best test in the world. Maybe 'dd
> if=/dev/ugen0 of=/dev/null' would be better.

ok; while the visor is trying to sync, I do this:

%(dd if=/dev/ugen0 of=/dev/null > out) >& err
%cat out
%cat err
dd: /dev/ugen0: Operation not supported by device
0+0 records in
0+0 records out
0 bytes transferred in 0.000634 secs (0 bytes/sec)

I also tried the following:
%cat < randomTextFile > /dev/ugen0
cat: stdout: Operation not supported by device
%cat < /dev/ugen0
cat: stdin: Operation not supported by device

(of course, all of this was done while the visor was trying to sync)

Should /dev/ugen0 be able to handle standard I/O?

-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.