- Renamed vsd_header to volume_structure_descriptor_header
- Extern'ed previously un-extern'ed char* constants - Added volume_structure_descriptor_header::id_matches() git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3220 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include "DiskStructures.h"
|
#include "DiskStructures.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
using namespace UDF;
|
using namespace UDF;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -23,6 +25,27 @@ const charspec kCS0Charspec = { character_set_type: 0,
|
|||||||
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Volume structure descriptor ids
|
||||||
|
const char* UDF::kVSDID_BEA = "BEA01";
|
||||||
|
const char* UDF::kVSDID_TEA = "TEA01";
|
||||||
|
const char* UDF::kVSDID_BOOT = "BOOT2";
|
||||||
|
const char* UDF::kVSDID_ISO = "CD001";
|
||||||
|
const char* UDF::kVSDID_ECMA167_2 = "NSR02";
|
||||||
|
const char* UDF::kVSDID_ECMA167_3 = "NSR03";
|
||||||
|
const char* UDF::kVSDID_ECMA168 = "CDW02";
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// volume_structure_descriptor_header
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
/*! \brief Returns true if the given \a id matches the header's id.
|
||||||
|
*/
|
||||||
|
bool
|
||||||
|
volume_structure_descriptor_header::id_matches(const char *id)
|
||||||
|
{
|
||||||
|
return strncmp(this->id, id, 5) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// udf_tag
|
// udf_tag
|
||||||
|
|||||||
@@ -113,21 +113,23 @@ struct entity_id {
|
|||||||
|
|
||||||
See also: ECMA 167 2/9.1
|
See also: ECMA 167 2/9.1
|
||||||
*/
|
*/
|
||||||
struct vsd_header {
|
struct volume_structure_descriptor_header {
|
||||||
uint8 type;
|
uint8 type;
|
||||||
char id[4];
|
char id[5];
|
||||||
uint8 version;
|
uint8 version;
|
||||||
|
|
||||||
|
bool id_matches(const char *id);
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
|
||||||
// Volume structure descriptor ids
|
// Volume structure descriptor ids
|
||||||
const char* kVSDID_BEA = "BEA01";
|
extern const char* kVSDID_BEA;
|
||||||
const char* kVSDID_TEA = "TEA01";
|
extern const char* kVSDID_TEA;
|
||||||
const char* kVSDID_BOOT = "BOOT2";
|
extern const char* kVSDID_BOOT;
|
||||||
const char* kVSDID_ISO = "CD001";
|
extern const char* kVSDID_ISO;
|
||||||
const char* kVSDID_ECMA167_2 = "NSR02";
|
extern const char* kVSDID_ECMA167_2;
|
||||||
const char* kVSDID_ECMA167_3 = "NSR03";
|
extern const char* kVSDID_ECMA167_3;
|
||||||
const char* kVSDID_ECMA168 = "CDW02";
|
extern const char* kVSDID_ECMA168;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -184,7 +186,7 @@ struct descriptor_tag {
|
|||||||
|
|
||||||
/*! \c descriptor_tag::id values
|
/*! \c descriptor_tag::id values
|
||||||
*/
|
*/
|
||||||
enum {
|
enum tag_id {
|
||||||
TAGID_UNDEFINED = 0,
|
TAGID_UNDEFINED = 0,
|
||||||
|
|
||||||
// ECMA 167, PART 3
|
// ECMA 167, PART 3
|
||||||
@@ -213,7 +215,7 @@ enum {
|
|||||||
TAGID_SPACE_BITMAP_DESCRIPTOR,
|
TAGID_SPACE_BITMAP_DESCRIPTOR,
|
||||||
TAGID_PARTITION_INTEGRITY_ENTRY,
|
TAGID_PARTITION_INTEGRITY_ENTRY,
|
||||||
TAGID_EXTENDED_FILE_ENTRY,
|
TAGID_EXTENDED_FILE_ENTRY,
|
||||||
} tag_id;
|
};
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Primary volume descriptor
|
/*! \brief Primary volume descriptor
|
||||||
@@ -828,7 +830,7 @@ struct extended_file_icb_entry {
|
|||||||
|
|
||||||
The id of the root directory of a file set shall be 0.
|
The id of the root directory of a file set shall be 0.
|
||||||
|
|
||||||
\todo Detail the system specific requirements for unique ids from UDF-2.01
|
\todo Detail the system specific requirements for unique ids from UDF-2.01 3.2.1.1
|
||||||
*/
|
*/
|
||||||
uint64 unique_id;
|
uint64 unique_id;
|
||||||
uint32 extended_attributes_length;
|
uint32 extended_attributes_length;
|
||||||
|
|||||||
Reference in New Issue
Block a user