[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Timeout problems with "blkid" applet
From:       Alexander Griesser <alexander.griesser () lkh-vil ! or ! at>
Date:       2009-02-19 11:46:41
Message-ID: 499D46A1.6080609 () lkh-vil ! or ! at
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Denys Vlasenko wrote:
>> So the CMOS definetly was configured wrong, but the question about
>> why busybox' blkid behaves differently is still unanswered.
> 
> Because busybox's blkid is very differently implemented.

Shouldn't it try to match the behaviour of the desktop version?

> I am much interested in results from the test program.

Well, no problem, whatever you want.

> You are saying all opens failed. Do they succeed if you remove O_NONBLOCK?

No.

> What does it print in that case?

The same output.
Argh. I added the following code before the continue when fd < 0:

printf("%s\n", strerror(errno));

The output then was "No such file or directory" and then I realized
that you had a typo in floppytest.c:

snprintf(path, 31, "/dev/fd%d\n", x);

That's actually bad, because there's a \n at the end of the filename.

After correcting this error, the output looks a bit better now:

O_RDONLY:

[testlxtc1 - /system #] ./a.out
time 1235043505 probing /dev/fd0
time 1235043544 opened the device
time 1235043544 did FDGETDRVTYP, result 0
name:'H1440'
time 1235043545 did FDPOLLDRVSTAT, result 0
ds.track:-2
time 1235043545 did FDGETPRM, result -1
time 1235043545 probing /dev/fd1
No such file or directory
time 1235043545 probing /dev/fd2
No such file or directory
time 1235043545 probing /dev/fd3
No such file or directory
time 1235043545 probing /dev/fd4
No such file or directory
time 1235043545 probing /dev/fd5
No such file or directory
time 1235043545 probing /dev/fd6
No such file or directory
time 1235043545 probing /dev/fd7
No such file or directory
[testlxtc1 - /system #]

O_RDONLY | O_NONBLOCK:

[testlxtc1 - /system #] ./a.out
time 1235043806 probing /dev/fd0time 1235043806 opened the device
time 1235043806 did FDGETDRVTYP, result 0
name:'H1440'
time 1235043807 did FDPOLLDRVSTAT, result 0
ds.track:-2
time 1235043807 did FDGETPRM, result -1
time 1235043807 probing /dev/fd1
No such file or directory
time 1235043807 probing /dev/fd2
No such file or directory
time 1235043807 probing /dev/fd3
No such file or directory
time 1235043807 probing /dev/fd4
No such file or directory
time 1235043807 probing /dev/fd5
No such file or directory
time 1235043807 probing /dev/fd6
No such file or directory
time 1235043807 probing /dev/fd7
No such file or directory
[testlxtc1 - /system #]

So, with O_NONBLOCK it almost immediately completes the task.

ciao,
- --
Alexander Griesser (Netzwerkadministration)
E-Mail: alexander.griesser@lkh-vil.or.at | Web: http://www.lkh-vil.or.at
KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach
Tel.:   +43 4242 208 3061 | Fax.:   +43 4242 208 971 2061
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmdRqEACgkQ66HVD6KUm1pRTgCfVjZgaOjeGyJCO80RouGTeoSE
REsAn0HcOYz2A8qVKPIBak6BJf44tRfA
=kQ2b
-----END PGP SIGNATURE-----
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic