[Libosinfo] [PATCH 03/12] media: Extract volume size from ISO9660 device/image

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Mon Mar 16 13:36:35 UTC 2015


On Mon, Mar 16, 2015 at 9:51 AM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Sun, Mar 15, 2015 at 04:04:50PM +0000, Zeeshan Ali (Khattak) wrote:
>> When creating a media object from an ISO9660 device/image, extract
>> volume size too along with other other information.
>> ---
>>  osinfo/osinfo_media.c | 19 ++++++++++++++++---
>>  1 file changed, 16 insertions(+), 3 deletions(-)
>>
>> diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
>> index e86df11..d9f3e0b 100644
>> --- a/osinfo/osinfo_media.c
>> +++ b/osinfo/osinfo_media.c
>> @@ -46,11 +46,15 @@ struct _PrimaryVolumeDescriptor {
>>      guint8 ignored[8];
>>      gchar  system[MAX_SYSTEM];       /* System ID */
>>      gchar  volume[MAX_VOLUME];       /* Volume ID */
>> -    guint8 ignored2[246];
>> +    guint8 ignored2[8];
>> +    gint32 volume_space_size[2];
>
> Why not guint32 ? At least wikipedia says that all numbers in ISO9660
> images are unsigned (I could not find the place where this is explicitly
> stated in the spec though).

IIRC, I first read them as guint32 and read them wrong. We have
various fedora testcases with these patches now so I'll try again with
guint32.

-- 
Regards,

Zeeshan Ali (Khattak)
________________________________________
Befriend GNOME: http://www.gnome.org/friends/




More information about the Libosinfo mailing list