libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] Re: private udf information


From: Shaya Potter
Subject: Re: [Libcdio-devel] Re: private udf information
Date: Tue, 19 Oct 2010 00:01:33 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4

On 10/18/2010 11:51 PM, Rocky Bernstein wrote:
On Mon, Oct 18, 2010 at 6:28 PM, Shaya Potter<address@hidden>  wrote:

as a followup to my previous information, this function I added to my own
private copy lets me do what I need

uint32_t udf_get_start_block(const udf_dirent_t *p_udf_dirent)
{
  udf_t *p_udf = p_udf_dirent->p_udf;
  uint32_t i_max_size;
  lba_t i_start = offset_to_lba(p_udf_dirent, p_udf->i_position,&i_start,
                                &i_max_size);
  return i_start;
}

a better solution might be a stat() type call that returns a lot of
information in a struct.


Suppose both struct udf_dirent_s and the udf_get_start_block() prototype
were put in udf.h. In other words suppose these were both made public.

Would that suffice?

A comment about udf_get_start_block is that it looks like at some point one
might want to do the same thing for i_max_size (as you indicated in the
original post); The code to get this would look almost identical as above.
So, as you suggest, perhaps a function returns both values in one shot would
be good.

the Q is, what parts of udf_dirent_s really need non exported functionality to understand. For instance, I couldn't write udf_get_start_block() easily outside of libudf, because I needed offset_to_lba().

As mentioned, part of me thinks a well thought out udf_stat() function is what's needed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]