bug-parted
[Top][All Lists]
Advanced

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

Sector file format (was: Re: Testing framework)


From: Patrick Leslie Polzer
Subject: Sector file format (was: Re: Testing framework)
Date: Mon, 14 Nov 2005 20:59:34 +0100

On Fri, 11 Nov 2005 20:50:15 +0100
Patrick Leslie Polzer <Patrick Leslie Polzer <address@hidden>>
wrote:

> On Fri, 11 Nov 2005 16:18:55 -0200
> Otavio Salvador <Otavio Salvador <address@hidden>> wrote:
>
> > I'm interested to know if nobody knows any ready framework that we
> > could use to make our life easier.
> We can use dejagnu or a similar system for test organization. But
> that does not relieve us from the task of constructing a system that
> enables us to test.
If nobody comes up with a better solution, the first and foremost
requirement is appropriate on-disk storage of specific sectors along
with device information.

My proposal is this:

1. Have one file per sector (format: binary octets)
   Why? This approach has the advantage of easy accessibility with the
   viewer's favorite hex editor in his favorite format.

2. Have a master file specifying things like block size and the
   translation table

3. Optionally let Parted tar these files (would add an optional
dependency to libtar and, also optional, gzip or bzip2.

This would require a new source file and header, storage.[hc] with
functions along these lines (sorted roughly by call order):


PedStorage* ped_storage_new_from_directory (char*);
PedStorage* ped_storage_new_from_tarball (char*);

int ped_storage_read (PedStorage*);

ped_storage_write_generic_info (PedStorage*, PedDevice*);
ped_storage_read_generic_info (PedStorage*, PedDevice*);

int ped_storage_add_sector (PedStorage*);
uint8_t* ped_storage_get_sector (PedStorage*);

int ped_storage_write (PedStorage*);

int ped_storage_close (PedStorage* which);


Do you think this is the right way to go?

Leslie

-- 
PGP-KID: 0x52D70289

Attachment: pgpvuj4Ny9pzX.pgp
Description: PGP signature


reply via email to

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