| A recent change to mrd_res_size(), which is used to find
out how much data is needed for a particular Read Element
Status command, was using the slot descriptor size as the
basis for the data size. Since the slot descriptors are
smaller than drive descriptors, too little was being
allocated for the command and the data off the end (where
the media, drive and source fields are) was getting garbage.
The current solutions are to use the slot descriptor size
only when larger than a reasonable maximum. V1.1 just
blindly used a reasonable maximum so this is a slight
improvement. The correct solution would still be use to
Read Element Status, but I discovered problems with it on
some "insane" robots. The MUSL problem with this feature
of Read Element Status is also a minor problem.
Having a better understanding of how Read Element Status
works and how it tends to behave when it doesn't work, I
may be able to get this to work correctly and in a way that
only requires one version of mrd_res_size(). We currently
have one for each operating system, but I think I can layer
it on top of mrd_read_element_status().
This particular problem can be closed. I'll use the MUSL
version of the problem to track any more improvements.
|