Commit Graph

238 Commits

Author SHA1 Message Date
Vreixo Formoso b29e2a7db2 Improve filesystem implementation to deal with local files.
Instead of storing the path of each file, we store the name plus a ref 
to the parent. That way, we safe around 5-10% of memory.
2008-01-11 19:48:52 +01:00
Vreixo Formoso 953da9ff8f Support for patching isolinux images. 2008-01-11 17:09:31 +01:00
Vreixo Formoso 807c43b20e Implementation of a IsoStream to read from a memory buffer. 2008-01-11 16:42:18 +01:00
Vreixo Formoso cd8943105c Functions to access volume information from an IsoImageFilesystem. 2008-01-11 16:19:50 +01:00
Vreixo Formoso f27f2449f9 Support for reading El-Torito info from previous images. 2008-01-11 15:43:39 +01:00
Vreixo Formoso 53c2215ab3 Add function to get the parent of a given node. 2008-01-10 22:10:11 +01:00
Vreixo Formoso 0d06e24cd5 Add support for El-Torito. 2008-01-10 19:41:08 +01:00
Vreixo Formoso 4f029437e2 Handling of El-Torito boot catalog at low level. 2008-01-10 18:53:39 +01:00
Vreixo Formoso 2ad6f5f667 Change IsoStream get_id definition, to always provide a valid id.
Streams are a better place to handle source content identification, when
the IsoFilesystem is unable to provide a valid identification.
2008-01-10 17:56:39 +01:00
Vreixo Formoso 47bdbd76b5 Add El-Torito estructures to an IsoImage, and APIs for manage it. 2008-01-10 17:22:53 +01:00
Vreixo Formoso 51df8c6284 Fix bug introduced when adding Joliet that causes libisofs to hang.
It causes an attempt to read an extra block from ring buffer to overwrite 
buffer, which causes libisofs to hang. The problem is that Volume Descriptor
Set terminator should not be read from buffer, but generated instead.
2008-01-09 18:57:47 +01:00
Vreixo Formoso ad65cc4d45 Add API to get the size of a file node. 2008-01-09 15:35:59 +01:00
Vreixo Formoso ba681a2601 Pad SVD attributes with " " to ensure Joliet compliance. 2008-01-08 22:16:55 +01:00
Vreixo Formoso 41472e66b7 Pad volume attributes with " " to ensure ECMA-119 compliance. 2008-01-08 21:58:36 +01:00
Vreixo Formoso 2464455fea Guard against bad link destinations. 2008-01-08 20:05:01 +01:00
Vreixo Formoso 1459801134 Ensure names of public tree IsoNodes are valid POSIX names. 2008-01-08 19:47:33 +01:00
Vreixo Formoso aec6c8ce69 Support for reading Joliet extensions. 2008-01-08 19:34:01 +01:00
Vreixo Formoso 747bed11b8 Bug fix: Joliet writer should be only created when Joliet is enabled. 2008-01-08 19:33:17 +01:00
Vreixo Formoso 7bb4eaf46d Little improves to image reading. 2008-01-08 17:33:06 +01:00
Vreixo Formoso 5d81305042 Expose Joliet. 2008-01-08 16:10:25 +01:00
Vreixo Formoso 5475502dc8 Different function for generate dir and files names for Joliet.
The "." is not mandatory on dirs.
2008-01-08 16:07:50 +01:00
Vreixo Formoso f73b53133b Correctly handle Big Endian UCS strings on both BE and LE machines. 2008-01-08 15:51:42 +01:00
Vreixo Formoso e9bcb22cee Write Joliet directory structures and path tables. 2008-01-06 19:08:35 +01:00
Vreixo Formoso 6d276ac0f6 Write Joliet Supplementary Volume Descriptor. 2008-01-06 18:45:32 +01:00
Vreixo Formoso 2ab47e5bac Compute length and position of Joliet structures. 2008-01-06 18:08:29 +01:00
Vreixo Formoso bd0f787f61 Store joliet-related info in Ecma119Image target insted of Writer.
In fact, this is not a good decission, writer is a better place for 
writer dependent data, but for now I prefer to store anything in the 
target. Later we can improve Writer encapsulation.
2008-01-06 17:52:58 +01:00
Vreixo Formoso 4b0833f62c Sort Joliet tree. 2008-01-06 17:43:19 +01:00
Vreixo Formoso 17e9955f93 Begin Joliet support. Creation of Joliet writer and Joliet tree. 2008-01-06 17:38:31 +01:00
Vreixo Formoso 355d28292f Util functions for Joliet name manipulation. 2008-01-06 17:02:16 +01:00
Vreixo Formoso 6298ef4814 Support charset conversion on symlink destination. 2008-01-05 17:45:25 +01:00
Vreixo Formoso c47e5a738d Let NULL input charset in image reading, that defaults to locale one. 2008-01-05 16:01:21 +01:00
Vreixo Formoso f3c27e681f Improve growing by padding the image, if needed.
The padding ensures first 64 KiB can be overwritten without data lost if 
we grow the image.
2008-01-05 03:16:33 +01:00
Vreixo Formoso 7af02cddd9 Support for image growing. 2008-01-05 02:03:22 +01:00
Vreixo Formoso e471333b0b Rename function to create burn_source. 2008-01-05 00:42:32 +01:00
Vreixo Formoso ee78419935 Add support for appendable multisession images. 2008-01-04 23:54:31 +01:00
Vreixo Formoso 0fdfe05d7e Fix bug in sort files. 2008-01-04 10:11:25 +01:00
Vreixo Formoso 932ce6ac70 Support for image modify. 2008-01-04 00:15:48 +01:00
Vreixo Formoso 4994155e73 Allow selection of charset encoding for RR names.
TODO: do the same with link destination.
2008-01-03 23:52:27 +01:00
Vreixo Formoso 22c73dc343 Add image contents recursively and volume attributes. 2008-01-03 20:04:08 +01:00
Vreixo Formoso 193fbaef8b Custom create_node() builder function to deal with old image files. 2008-01-03 19:47:44 +01:00
Vreixo Formoso 58a7d8e853 First functions and structures for image import. 2008-01-03 19:17:55 +01:00
Vreixo Formoso 2f535abe85 Fix bug related with reading of images with reallocated dirs. 2008-01-03 17:16:27 +01:00
Vreixo Formoso b8e44a936a Little test app that extracts contents of a file from image. 2008-01-03 13:28:51 +01:00
Vreixo Formoso 2fada8eaa4 Support for getting arbitrary file on image by path. 2008-01-03 13:27:24 +01:00
Vreixo Formoso 282ffa9a98 Function to read file contents from image. 2008-01-03 00:56:11 +01:00
Vreixo Formoso 33635c4e41 Readlink implementation for Image filesystem. 2008-01-03 00:29:30 +01:00
Vreixo Formoso b273290415 Little demo program that outputs a read iso image. 2008-01-03 00:19:39 +01:00
Vreixo Formoso 42cd599d2d Fix bug in DataSource. 2008-01-03 00:18:59 +01:00
Vreixo Formoso 5bf798d550 Support for close and readdir. 2008-01-02 19:12:12 +01:00
Vreixo Formoso a7b687818f Support for reading a dir inside an image, step 1. 2008-01-02 18:56:45 +01:00
Vreixo Formoso 8423e0acf6 Handle propertly root dir, that hasn't name nor parent. 2008-01-01 20:27:52 +01:00
Vreixo Formoso 34e7a8dad0 Fix bug in RR PX entry parsing. 2008-01-01 20:27:07 +01:00
Vreixo Formoso ad2974940a Correctly manage image size and written progress. 2008-01-01 20:25:07 +01:00
Vreixo Formoso 2a0f762213 Function to get root FileSource on a IsoImageFilesystem. 2007-12-31 22:00:44 +01:00
Vreixo Formoso be37936534 Add function to create an IsoFileSource from an ISO image. 2007-12-31 21:51:35 +01:00
Vreixo Formoso dc6cd09877 Add functions to read RockRidge SUSP entries. 2007-12-31 21:51:31 +01:00
Vreixo Formoso c296ca9ff5 iso_file_source_new_lfs() can be static. 2007-12-31 16:29:47 +01:00
Vreixo Formoso baf7f14b11 Change get_path() definition in IsoFileSource. 2007-12-31 16:27:08 +01:00
Vreixo Formoso 263770ab4f Read Volume Descriptors and identify RR extensions, if any. 2007-12-31 03:36:48 +01:00
Vreixo Formoso e18f5d8898 Change message functions signature. 2007-12-30 22:04:41 +01:00
Vreixo Formoso d8cb56ecf3 Start implementation of IsoFilesystem for reading ISO images. 2007-12-30 21:39:17 +01:00
Vreixo Formoso 135ac835eb Implementation of IsoDataSource based on POSIX I/O. 2007-12-30 18:29:39 +01:00
Vreixo Formoso 702bd0f288 Isolate non-standard eaccess usage in a util function.
That will be replaced soon with our own implementation, based on POSIX 
standard functions.
2007-12-30 18:07:01 +01:00
Vreixo Formoso c786fc70b6 Fix bug in progress info, count last written bytes in percent. 2007-12-30 18:05:35 +01:00
Vreixo Formoso 48e243d5da Define interface for IsoDataSource to access existent images. 2007-12-30 17:47:44 +01:00
Vreixo Formoso f9ee153a97 More unit test to check correct RR entries generation for symlinks. 2007-12-30 17:01:51 +01:00
Vreixo Formoso d9c9aea0c5 Fix integer overflow in progress count. 2007-12-29 22:21:11 +01:00
Vreixo Formoso 7e66fe43ce Reduce memory usage in low level tree, by storing dir info separately. 2007-12-29 18:30:59 +01:00
Vreixo Formoso 4b8db2f274 Report writting progress. 2007-12-29 17:42:57 +01:00
Vreixo Formoso a2645cbf40 Expose several tree options, to control recursive dir addition. 2007-12-29 17:15:24 +01:00
Vreixo Formoso 501275279d Change recOpts in Image, it can be part of the Image struct, not a ptr. 2007-12-29 16:49:04 +01:00
Vreixo Formoso 71cd3ccb89 Check access to file contents before adding it to public iso tree. 2007-12-29 16:34:17 +01:00
Vreixo Formoso 5c22069d19 Add function to check if we have access to IsoFileSource contents. 2007-12-29 16:30:13 +01:00
Vreixo Formoso c915c6e3f4 Add a function to identify a Stream, for user notification. 2007-12-29 01:58:42 +01:00
Vreixo Formoso 26a04559c7 Some fixes to memory leak bugs. 2007-12-28 22:45:56 +01:00
Vreixo Formoso 4c9d83f051 Define code style formatter for eclipse and apply it to source. 2007-12-28 22:10:17 +01:00
Vreixo Formoso 9a90afcf69 Support for setting an output charset for RR NM entries.
It will default to input charset (i.e. the locale charset for now). 
Names will be stored internally in that locale charset. Note that input 
charset musn't be changed by user. Instead, we can provide an input 
charset property to IsoFilesystem implementations.
2007-12-28 00:20:02 +01:00
Vreixo Formoso 6c7c54af93 Fix bug in strconv, take care about the end of string NULL character. 2007-12-28 00:18:49 +01:00
Vreixo Formoso c3ded11773 Util function to convert string charset. 2007-12-27 21:11:29 +01:00
Vreixo Formoso 1e4851792b First step to input/output charset handling. 2007-12-27 18:55:47 +01:00
Vreixo Formoso a8636eaa60 Support for setting default modes for files and dirs. 2007-12-27 18:10:14 +01:00
Vreixo Formoso 941e2022e8 Expose RockRidge option. 2007-12-27 10:43:06 +01:00
Vreixo Formoso c9957cb25e Some unit test for RR/SUSP entries generation and size calculation. 2007-12-27 00:45:44 +01:00
Vreixo Formoso dd97f67ee4 Add functions to read timestamps from ISO images. 2007-12-27 00:29:12 +01:00
Vreixo Formoso aae230a321 Add util functions to deal with ISO types. 2007-12-27 00:19:09 +01:00
Vreixo Formoso bf51fba3bc Ensure ce is set to 0 at the beginning of calc size. 2007-12-26 19:05:06 +01:00
Vreixo Formoso ddd703e7c4 Fix several bugs related to RR SL/NM fields (PT 2 :). 2007-12-26 18:19:00 +01:00
Vreixo Formoso 5f6b5fd930 Guard against wrong POSIX filenames in node. 2007-12-26 16:34:07 +01:00
Vreixo Formoso 6509134411 Fix bug with RR NM and SL entries. 2007-12-26 12:48:48 +01:00
Vreixo Formoso 49344b3ca9 Fix bug in path table size computation. 2007-12-25 23:33:37 +01:00
Vreixo Formoso d954957d83 If needed, add version number to symlinks and special files too. 2007-12-25 18:59:20 +01:00
Vreixo Formoso bf0c1dd219 Add nlink and ino fields. No true usage for now. 2007-12-25 18:51:00 +01:00
Vreixo Formoso f8f2dcb6b0 RockRidge support, now RR/SUSP entries are correctly written.
This also fix a little bug, ensuring SP is written first to the "." 
entry of the directory record.
2007-12-25 18:35:10 +01:00
Vreixo Formoso 54038ec54b Functions to add RR/SUSP entries. Fix little bugs. 2007-12-25 17:53:17 +01:00
Vreixo Formoso c3af3553df Define functions to generate and write the RR/SUSP fields. 2007-12-24 16:29:57 +01:00
Vreixo Formoso 778e39ba3c Take care about the RR entries when computing the size, and cache it.
When computing the size of the directory structures, take care about the size
taken by the RR/SUSP fields. Also, cache that size, otherwise we need to do
this computation several times and it is ugly, because the CE entries need to 
know where the Continuation Area will be stored.
2007-12-24 14:24:09 +01:00
Vreixo Formoso 98b2dc2658 Take into account that System Use Field may be padded. 2007-12-24 14:04:15 +01:00
Vreixo Formoso d48c553f40 Implement function to compute the size needed for RR field. 2007-12-24 04:31:15 +01:00
Vreixo Formoso 9de0be2602 Guard in public API agains bad names or link destinations. 2007-12-24 04:20:29 +01:00
Vreixo Formoso 227b17f251 Store a pointer to the real parent in reparent dirs. 2007-12-23 17:41:21 +01:00