Add TODOs to TODO file. Remove // comments that cause compiler warning.

This commit is contained in:
Vreixo Formoso 2008-01-19 16:12:08 +01:00
parent 3361e941a6
commit 52d1e911ac
12 changed files with 68 additions and 41 deletions

26
TODO
View File

@ -6,12 +6,36 @@ TODO
====
#00001 (node.h) -> consider adding new timestamps to IsoTreeNode
#00002 (node.h) -> handle deletion of each kind of node
OK #00002 (node.h) -> handle deletion of each kind of node
#00003 make error.h header public
#00004 (fsource-h) -> Add a get_mime_type() function.
#00005 (node.c) -> optimize iso_dir_iter_take.
#00006 (libisofs.h) -> define more replace values when adding a node to a dir
#00007 (libisofs.h) -> expose iso_tree_add_new_file
#00008 (data_dource.c) -> guard against partial reads
#00009 (ecma119_tree.c/h) -> add true support for harlinks and inode numbers
#00010 (buffer.c) -> optimize ring buffer
#00011 (ecma119.c) -> guard against bad path table usage with more than 65535 dirs
#00012 (fs_image.c) -> support follow symlinks on imafe filesystem
#00013 (fs_image.c) -> check for unsupported flags when reading a dir record
#00014 (fs_image.c) -> more sanity checks to ensure dir record info is valid
#00015 (fs_image.c) -> take care of CD-ROM XA discs when reading SP entry
#00016 (fs_image.c) -> handle non RR ER entries
#00017 (fs_image.c) -> take advantage of other atts of PVD
#00018 (fs_image.c) -> check if there are more entries in the boot catalog
#00019 (fs_image.c) -> set IsoImage attribs from Joliet SVD?
#00020 (fs_image.c) -> handle RR info in Joliet tree
#00021 (fs_image.c) -> handle RR info in ISO 9660:1999 tree
#00022 (joliet.c) -> support relaxed constraints in joliet filenames
#00023 (libisofs.h) -> let different default file and dir mode for iso reading
#00024 (libisofs.h) -> option to convert names to lower case for iso reading
#00025 (libisofs.h) -> support for merging old image files
#00026 (libisofs.h) -> add support for "hidden" bootable images.
#00027 (iso1999.h) -> Follow ISO 9660:1999 specs when sorting files
FIXME
=====
#00001 (iso1999.c) -> Mangle ISO 9660:1999 names
#00002 (joliet.c) -> Mangle Joliet names

View File

@ -9,7 +9,7 @@
/*
* Synchronized ring buffer, works with a writer thread and a read thread.
*
* TODO things to optimize
* TODO #00010 : optimize ring buffer
* - write/read at the end of buffer requires a second mutex_lock, even if
* there's enought space/data at the beginning
* - pre-buffer for writes < BLOCK_SIZE

View File

@ -111,7 +111,7 @@ static int ds_read_block(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
return ISO_FILE_SEEK_ERROR;
}
// TODO guard against partial reads.
/* TODO #00008 : guard against partial reads. */
if (read(data->fd, buffer, 2048) != 2048) {
return ISO_FILE_READ_ERROR;
}

View File

@ -30,7 +30,8 @@
#include <langinfo.h>
/*
* TODO image with more than 65535 directories have path_table related problems
* TODO #00011 : guard against bad path table usage with more than 65535 dirs
* image with more than 65535 directories have path_table related problems
* due to 16 bits parent id. Note that this problem only affects to folders
* that are parent of another folder.
*/

View File

@ -107,7 +107,7 @@ int create_ecma119_node(Ecma119Image *img, IsoNode *iso, Ecma119Node **node)
ecma->node = iso;
iso_node_ref(iso);
// TODO better handling of this, add support for harlinks
/* TODO #00009 : add true support for harlinks and inode numbers */
ecma->nlink = 1;
ecma->ino = ++img->ino;

View File

@ -62,7 +62,7 @@ struct ecma119_node
IsoNode *node; /*< reference to the iso node */
// TODO add true support for this
/* TODO #00009 : add true support for harlinks and inode numbers */
ino_t ino;
nlink_t nlink;

View File

@ -253,7 +253,7 @@ int ifs_stat(IsoFileSource *src, struct stat *info)
data = (ImageFileSourceData*)src->data;
if (S_ISLNK(data->info.st_mode)) {
/* TODO follow symlinks not supported yet */
/* TODO #00012 : support follow symlinks on imafe filesystem */
return ISO_FILE_BAD_PATH;
}
*info = data->info;
@ -801,7 +801,7 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
return ISO_UNSUPPORTED_ECMA119;
}
//TODO check for other flags?
/* TODO #00013 : check for unsupported flags when reading a dir record */
/*
* The idea is to read all the RR entries (if we want to do that and RR
@ -1112,7 +1112,7 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
atts.st_blksize = BLOCK_SIZE;
atts.st_blocks = DIV_UP(atts.st_size, BLOCK_SIZE);
//TODO more sanity checks!!
/* TODO #00014 : more sanity checks to ensure dir record info is valid */
if (S_ISLNK(atts.st_mode) && (linkdest == NULL)) {
iso_msg_sorry(fsdata->msgid, LIBISO_RR_ERROR,
"Link without destination.");
@ -1407,7 +1407,7 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block)
record = (struct ecma119_dir_record *)buffer;
/*
* TODO
* TODO #00015 : take care of CD-ROM XA discs when reading SP entry
* SUSP specification claims that for CD-ROM XA the SP entry
* is not at position BP 1, but at BP 15. Is that used?
* In that case, we need to set info->len_skp to 15!!
@ -1454,11 +1454,13 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block)
* Ok, now search for ER entry.
* Just notice that the attributes for root dir are read elsewhere.
*
* TODO if several ER are present, we need to identify the position of
* what refers to RR, and then look for corresponding ES entry in
* each directory record. I have not implemented this (it's not used,
* no?), but if we finally need it, it can be easily implemented in
* the iterator, transparently for the rest of the code.
* TODO #00016 : handle non RR ER entries
*
* if several ER are present, we need to identify the position of
* what refers to RR, and then look for corresponding ES entry in
* each directory record. I have not implemented this (it's not used,
* no?), but if we finally need it, it can be easily implemented in
* the iterator, transparently for the rest of the code.
*/
while ((ret = susp_iter_next(iter, &sue)) > 0) {
@ -1494,7 +1496,6 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block)
iso_msg_debug(data->msgid,
"Suitable Rock Ridge ER found. Version 1.12.");
data->rr_version = RR_EXT_112;
//TODO check also version?
} else {
iso_msg_warn(data->msgid, LIBISO_SUSP_MULTIPLE_ER,
"Not Rock Ridge ER found.\n"
@ -1556,8 +1557,8 @@ int read_pvm(_ImageFsData *data, uint32_t block)
data->pvd_root_block = iso_read_bb(rootdr->block, 4, NULL);
/*
* TODO
* PVM has other things that could be interesting, but that don't have a
* TODO #00017 : take advantage of other atts of PVD
* PVD has other things that could be interesting, but that don't have a
* member in IsoImage, such as creation date. In a multisession disc, we
* could keep the creation date and update the modification date, for
* example.
@ -1612,7 +1613,7 @@ int read_el_torito_boot_catalog(_ImageFsData *data, uint32_t block)
data->load_size = iso_read_lsb(entry->sec_count, 2);
data->imgblock = iso_read_lsb(entry->block, 4);
//TODO check if there are more entries?
/* TODO #00018 : check if there are more entries in the boot catalog */
return ISO_SUCCESS;
}
@ -1732,12 +1733,8 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
data->joliet = 1;
root = (struct ecma119_dir_record*)sup->root_dir_record;
data->svd_root_block = iso_read_bb(root->block, 4, NULL);
//TODO maybe we can set the IsoImage attribs from this
//descriptor
//TODO a joliet tree can also have RR extensions. What
//about this?
/* TODO #00019 : set IsoImage attribs from Joliet SVD? */
/* TODO #00020 : handle RR info in Joliet tree */
} else if (sup->vol_desc_version[0] == 2) {
/*
* It is an Enhanced Volume Descriptor, image is an
@ -1747,8 +1744,7 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
data->iso1999 = 1;
root = (struct ecma119_dir_record*)sup->root_dir_record;
data->evd_root_block = iso_read_bb(root->block, 4, NULL);
//TODO an ISO 9660:1999 tree can also have RR extensions.
// What about this?
/* TODO #00021 : handle RR info in ISO 9660:1999 tree */
} else {
iso_msg_hint(data->msgid, LIBISO_UNSUPPORTED_VD,
"Unsupported Sup. Vol. Desc found.");

View File

@ -250,7 +250,8 @@ cmp_node(const void *f1, const void *f2)
Iso1999Node *g = *((Iso1999Node**)f2);
/**
* TODO strcmp do not does exactly what ISO 9660:1999, 9.3, as characters
* TODO #00027 Follow ISO 9660:1999 specs when sorting files
* strcmp do not does exactly what ISO 9660:1999, 9.3, as characters
* < 0x20 " " are allowed, so name len must be taken into accout
*/
return strcmp(f->name, g->name);
@ -299,8 +300,11 @@ int iso1999_tree_create(Ecma119Image *t)
iso_msg_debug(t->image->id, "Sorting the ISO 9660:1999 tree...");
sort_tree(root);
//iso_msg_debug(t->image->id, "Mangling ISO 9660:1999 names...");
// FIXME ret = mangle_tree(t, 1);
/*
* FIXME #00001 : Mangle ISO 9660:1999 names
* iso_msg_debug(t->image->id, "Mangling ISO 9660:1999 names...");
* FIXME ret = mangle_tree(t, 1);
*/
return ISO_SUCCESS;
}

View File

@ -36,7 +36,7 @@ int get_joliet_name(Ecma119Image *t, IsoNode *iso, uint16_t **name)
return ret;
}
// TODO add support for relaxed constraints
/* TODO #00022 : support relaxed constraints in joliet filenames */
if (iso->type == LIBISO_DIR) {
jname = iso_j_dir_id(ucs_name);
} else {
@ -300,8 +300,11 @@ int joliet_tree_create(Ecma119Image *t)
iso_msg_debug(t->image->id, "Sorting the Joliet tree...");
sort_tree(root);
//iso_msg_debug(t->image->id, "Mangling Joliet names...");
// FIXME ret = mangle_tree(t, 1);
/*
* FIXME #00002 : Mangle Joliet names
* iso_msg_debug(t->image->id, "Mangling Joliet names...");
* FIXME ret = mangle_tree(t, 1);
*/
return ISO_SUCCESS;
}

View File

@ -361,8 +361,8 @@ struct iso_read_opts
uid_t uid; /**< Default uid when no RR */
gid_t gid; /**< Default uid when no RR */
mode_t mode; /**< Default mode when no RR (only permissions) */
//TODO differ file and dir mode
//option to convert names to lower case?
/* TODO #00023 : let different default file and dir mode for iso reading */
/* TODO #00024 : option to convert names to lower case for iso reading */
/**
* Input charset for RR file names. NULL to use default locale charset.
@ -446,7 +446,8 @@ int iso_image_create_burn_source(IsoImage *image, Ecma119WriteOpts *opts,
* @param image
* The image context to which old image will be imported. Note that all
* files added to image, and image attributes, will be replaced with the
* contents of the old image. TODO support for merging old image files
* contents of the old image.
* TODO #00025 support for merging old image files
* @param src
* Data Source from which old image will be read. A extra reference is
* added, so you still need to iso_data_source_unref() yours.
@ -636,7 +637,7 @@ int iso_image_set_boot_image(IsoImage *image, const char *image_path,
const char *catalog_path,
ElToritoBootImage **boot);
//TODO add support for "hidden" bootable images.
/* TODO #00026 : add support for "hidden" bootable images. */
/**
* Get El-Torito boot image of an ISO image, if any.
@ -1099,7 +1100,7 @@ off_t iso_file_get_size(IsoFile *file);
int iso_tree_add_new_dir(IsoDir *parent, const char *name, IsoDir **dir);
/*
TODO #00007 expose Strem and thi function:
TODO #00007 expose Stream and this function:
int iso_tree_add_new_file(IsoDir *parent, const char *name, stream, file)
*/

View File

@ -56,7 +56,7 @@ void iso_node_unref(IsoNode *node)
free(link->dest);
}
default:
/* TODO #00002 handle deletion of each kind of node */
/* other kind of nodes does not need to delete anything here */
break;
}

View File

@ -173,8 +173,6 @@ int str2wchar(const char *icharset, const char *input, wchar_t **output)
* different than icharset.
* We can't do anything better than replace by "_" and continue.
*/
/* TODO we need a way to report this */
/* printf("String %s is not encoded in %s\n", str, codeset); */
inbytes--;
src++;