Added iso_special_get_dev() API to retrieve devide id for device files.

This commit is contained in:
Vreixo Formoso 2008-05-26 15:43:55 +02:00
parent 558bdde116
commit 86a3f4de22
2 changed files with 23 additions and 0 deletions

View File

@ -2493,6 +2493,16 @@ int iso_file_get_sort_weight(IsoFile *file);
*/
off_t iso_file_get_size(IsoFile *file);
/**
* Get the device id (major/minor numbers) of the given block or
* character device file. The result is undefined for other kind
* of special files, of first be sure iso_node_get_mode() returns either
* S_IFBLK or S_IFCHR.
*
* @since 0.6.6
*/
dev_t iso_special_get_dev(IsoSpecial *special);
/**
* Get the IsoStream that represents the contents of the given IsoFile.
*

View File

@ -906,6 +906,19 @@ IsoStream *iso_file_get_stream(IsoFile *file)
return file->stream;
}
/**
* Get the device id (major/minor numbers) of the given block or
* character device file. The result is undefined for other kind
* of special files, of first be sure iso_node_get_mode() returns either
* S_IFBLK or S_IFCHR.
*
* @since 0.6.6
*/
dev_t iso_special_get_dev(IsoSpecial *special)
{
return special->dev;
}
/**
* Get the block lba of a file node, if it was imported from an old image.
*