New API call iso_node_lookup_attr()

and new xattr "isofs.st" for image start timestamp.
This commit is contained in:
Thomas Schmitt 2009-04-03 15:34:23 +02:00
parent 437713cd8e
commit 198f6536bc
3 changed files with 74 additions and 3 deletions

View File

@ -54,5 +54,32 @@ Registered:
18 Mar 2009 by Thomas Schmitt for libisofs.
-------------------------------------------------------------------------------
Name:
isofs.st
Purpose:
Records a time point at least 1 second before any nodes were added to a
freshly loaded or created ISO image. Nodes in the image which have
younger timestamps are suspect to have changed their content during
image production and might bear inconsistent content.
The RRIP timestamps have a blind second during which a change after
node registration would not be recognizable for incremental backups
which are based in "isofs.di" rather than on content comparison.
This attribute shall eventually be attached to the root directory entry
and be global for the whole image.
Format of Value:
Shall hold UTC seconds since 1970 as decimal number string without
terminating 0-byte.
Example:
{ '1', '2', '3', '8', '7', '4', '2', '2', '9', '6' }
Registered:
03 Apr 2009 by Thomas Schmitt for xorriso.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

View File

@ -4454,7 +4454,7 @@ mode_t iso_node_get_perms_wo_acl(const IsoNode *node);
* For all other ACL purposes use iso_node_get_acl_text().
*
* @param node
* The node that is to be manipulated.
* The node that is to be inquired.
* @param num_attrs
* Will return the number of name-value pairs
* @param names
@ -4477,6 +4477,29 @@ mode_t iso_node_get_perms_wo_acl(const IsoNode *node);
int iso_node_get_attrs(IsoNode *node, size_t *num_attrs,
char ***names, size_t **value_lengths, char ***values, int flag);
/* ts A90403 */
/**
* Obtain the value of a particular xattr name. Eventually make a copy of
* that value and add a trailing 0 byte for caller convenience.
* @param node
* The node that is to be inquired.
* @param name
* The xattr name that shall be looked up.
* @param value_length
* Will return the lenght of value
* @param value
* Will return a string of 8-bit bytes. free() it when no longer needed.
* @param flag
* Bitfield for control purposes, unused yet, submit 0
* @return
* 1= name found , 0= name not found , <0 indicates error error
*
* @since 0.6.18
*/
int iso_node_lookup_attr(IsoNode *node, char *name,
size_t *value_length, char **value, int flag);
/**
* Set the list of xattr which is associated with the node.
* The data get copied so that you may dispose your input data afterwards.
@ -4667,9 +4690,9 @@ int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
size_t *value_lengths, char **values, int flag);
/* ------------------------------------------------------------------------- */
/* ---------------------------- External Filters --------------------------- */
/* >>> ts A90325 */
/* ts A90325 */
/**
* Representation of an external program that shall serve as filter for
* an IsoStream. This object may be shared among many IsoStream objects.

View File

@ -1483,6 +1483,27 @@ int iso_aa_lookup_attr(unsigned char *aa_string, char *name,
}
/* ts A90403 */
/* API */
int iso_node_lookup_attr(IsoNode *node, char *name,
size_t *value_length, char **value, int flag)
{
void *xipt;
unsigned char *aa_string = NULL;
int ret;
*value_length= 0;
*value= NULL;
ret = iso_node_get_xinfo(node, aaip_xinfo_func, &xipt);
if (ret != 1)
return 0;
aa_string = (unsigned char *) xipt;
ret = iso_aa_lookup_attr(aa_string, name, value_length, value, 0);
return ret;
}
/* API */
int iso_node_get_attrs(IsoNode *node, size_t *num_attrs,
char ***names, size_t **value_lengths, char ***values, int flag)
{