[libbluray-devel] UDF dir read does not return 1 on EOF

Matteo Bini matteobin at tiepi.it
Sat Sep 23 10:48:55 UTC 2023


Dear developers,
thank you for your work: libbluray is amazing!

I've wrote a simple program to make 1:1 copies of my Blu-ray discs or to
save an unencrypted BDMV stream [1].

I've noticed an inconsistency between the library documentation and its
actual behaviour. When you read a BD-ROM dir, the UDF read function does
not return 1 on EOF [2], as wrote in the comments of the file system
header [3].

When reading a BD-ROM dir I get 0 with success or -1, when there's an
error or there's nothing more to read. Is this the intended behaviour?
Would it be possible to distinguish between read error and EOF?

Thank you very much for your time and cooperation.

--
Matteo Bini


[1] https://git.golem.linux.it/matteobin/bluraybackup
[2] https://code.videolan.org/videolan/libbluray/-/blob/master/src/libbluray/disc/udf_fs.c#L110
[3] https://code.videolan.org/videolan/libbluray/-/blob/master/src/file/filesystem.h#L141


More information about the libbluray-devel mailing list