Make udf_read_block more like 2 read. Implementation is closer

to the description (although it needs more work.)
udf_fs.h: break out udf_check_tag()
*.h: /*! -> /** - is more like Javadoc.
This commit is contained in:
rocky
2006-04-11 05:47:57 +00:00
parent e039fcee0e
commit d0d5ea424f
6 changed files with 111 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
/*
$Id: udf_file.h,v 1.7 2005/11/06 19:12:35 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
$Id: udf_file.h,v 1.8 2006/04/11 05:47:57 rocky Exp $
Copyright (C) 2005, 2006 Rocky Bernstein <rockyb@users.sourceforge.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*!
/**
* \file udf_file.h
*
* \brief Routines involving UDF file operations
@@ -31,44 +31,55 @@
extern "C" {
#endif /* __cplusplus */
/*!
/**
Return the file id descriptor of the given file.
*/
bool udf_get_fileid_descriptor(const udf_dirent_t *p_udf_dirent,
/*out*/ udf_fileid_desc_t *p_udf_fid);
/*!
/**
Return the name of the file
*/
const char *udf_get_filename(const udf_dirent_t *p_udf_dirent);
/*!
/**
Return the name of the file
*/
bool udf_get_file_entry(const udf_dirent_t *p_udf_dirent,
/*out*/ udf_file_entry_t *p_udf_fe);
/*!
/**
Return the number of hard links of the file. Return 0 if error.
*/
uint16_t udf_get_link_count(const udf_dirent_t *p_udf_dirent);
/*!
/**
Return the file length the file. Return 2147483647L if error.
*/
uint64_t udf_get_file_length(const udf_dirent_t *p_udf_dirent);
/*!
/**
Returns a POSIX mode for a given p_udf_dirent.
*/
mode_t udf_get_posix_filemode(const udf_dirent_t *p_udf_dirent);
/*!
/**
Return the next subdirectory.
*/
udf_dirent_t *udf_opendir(const udf_dirent_t *p_udf_dirent);
/*!
/**
Attempts to read up to count bytes from UDF directory entry
p_udf_dirent into the buffer starting at buf. buf should be a
multiple of UDF_BLOCKSIZE bytes.
If count is zero, read() returns zero and has no other results. If
count is greater than SSIZE_MAX, the result is unspecified.
If there is an error, cast the result to driver_return_code_t for
the specific error code.
*/
/**
Attempts to read up to count bytes from file descriptor fd into
the buffer starting at buf.
@@ -78,7 +89,7 @@ extern "C" {
driver_return_code_t udf_read_block(const udf_dirent_t *p_udf_dirent,
void * buf, size_t count);
/*!
/**
Advances p_udf_direct to the the next directory entry in the
pointed to by p_udf_dir. It also returns this as the value. NULL
is returned on reaching the end-of-file or if an error. Also
@@ -88,12 +99,12 @@ extern "C" {
*/
udf_dirent_t *udf_readdir(udf_dirent_t *p_udf_dirent);
/*!
/**
free free resources associated with p_udf_dirent.
*/
bool udf_dirent_free(udf_dirent_t *p_udf_dirent);
/*!
/**
Return true if the file is a directory.
*/
bool udf_is_dir(const udf_dirent_t *p_udf_dirent);