Skip to content
API Documentation
BastionGuard™
hfs::anonymous_namespace{hfs_catalog.cpp} Namespace Reference

Functions

BSDInfo parse_bsd_info (const unsigned char *p)
FinderInfo16 parse_finder_info (const unsigned char *p)

Function Documentation

◆ parse_bsd_info()

BSDInfo hfs::anonymous_namespace{hfs_catalog.cpp}::parse_bsd_info ( const unsigned char * p)

Definition at line 21 of file hfs_catalog.cpp.

21 {
22 BSDInfo b;
23 b.ownerID = be32(p + 0x00);
24 b.groupID = be32(p + 0x04);
25 b.adminFlags = p[0x08];
26 b.ownerFlags = p[0x09];
27 b.fileMode = be16(p + 0x0A);
28 b.special = be32(p + 0x0C);
29 return b;
30}
uint32_t be32(const unsigned char *p)
uint16_t be16(const unsigned char *p)
uint8_t ownerFlags
uint32_t groupID
uint16_t fileMode
uint32_t special
uint32_t ownerID
uint8_t adminFlags

References hfs::BSDInfo::adminFlags, hfs::be16(), hfs::be32(), hfs::BSDInfo::fileMode, hfs::BSDInfo::groupID, hfs::BSDInfo::ownerFlags, hfs::BSDInfo::ownerID, parse_bsd_info(), and hfs::BSDInfo::special.

Referenced by parse_bsd_info().

◆ parse_finder_info()

FinderInfo16 hfs::anonymous_namespace{hfs_catalog.cpp}::parse_finder_info ( const unsigned char * p)

Definition at line 34 of file hfs_catalog.cpp.

34 {
36 f.fileType = be32(p + 0x00);
37 f.fileCreator = be32(p + 0x04);
38 f.finderFlags = be16(p + 0x08);
39 return f;
40}

References hfs::be16(), hfs::be32(), hfs::FinderInfo16::fileCreator, hfs::FinderInfo16::fileType, hfs::FinderInfo16::finderFlags, and parse_finder_info().

Referenced by parse_finder_info().