30#define kNeFSInvalidFork (-1)
31#define kNeFSInvalidCatalog (-1)
32#define kNeFSCatalogNameLen (256)
34#define kNeFSVolumeName "NeFS Volume"
36#define kNeFSMinimumDiskSize (mib_cast(8))
38#define kNeFSSectorSz (512)
40#define kNeFSIdentLen (8)
41#define kNeFSIdent " NeFS"
42#define kNeFSPadLen (392)
44#define kNeFSMetaFilePrefix '$'
46#define kNeFSVersionInteger (0x0129)
47#define kNeFSVerionString "1.2.9"
50#define kNeFSDataFork "main_data"
51#define kNeFSResourceFork "main_rsrc"
53#define kNeFSForkSize (sizeof(NEFS_FORK_STRUCT))
55#define kNeFSPartitionTypeStandard (7)
56#define kNeFSPartitionTypePage (8)
57#define kNeFSPartitionTypeBoot (9)
59#define kNeFSCatalogKindFile (1)
60#define kNeFSCatalogKindDir (2)
61#define kNeFSCatalogKindAlias (3)
64#define kNeFSCatalogKindShared (4)
66#define kNeFSCatalogKindResource (5)
67#define kNeFSCatalogKindExecutable (6)
69#define kNeFSCatalogKindPage (8)
71#define kNeFSCatalogKindDevice (9)
72#define kNeFSCatalogKindLock (10)
74#define kNeFSCatalogKindRLE (11)
75#define kNeFSCatalogKindMetaFile (12)
77#define kNeFSCatalogKindTTF (13)
78#define kNeFSCatalogKindRIFF (14)
79#define kNeFSCatalogKindMPEG (15)
80#define kNeFSCatalogKindMOFF (16)
82#define kNeFSSeparator '/'
83#define kNeFSSeparatorAlt '/'
85#define kNeFSUpDir ".."
87#define kNeFSRootAlt "/"
92#define kNeFSBitWidth (sizeof(Kernel::Char))
93#define kNeFSLbaType (Kernel::Lba)
96#define kNeFSRootCatalogStartAddress (1024)
97#define kNeFSCatalogStartAddress (kNeFSRootCatalogStartAddress + sizeof(NEFS_ROOT_PARTITION_BLOCK))
99#define kResourceTypeDialog (10)
100#define kResourceTypeString (11)
101#define kResourceTypeMenu (12)
102#define kResourceTypeSound (13)
103#define kResourceTypeFont (14)
104#define kNeFSPartLen (32)
106#define kNeFSFlagDeleted (70)
107#define kNeFSFlagUnallocated (0)
108#define kNeFSFlagCreated (71)
110#define kNeFSMimeNameLen (200)
111#define kNeFSForkNameLen (199)
113#define kNeFSFrameworkExt ".fwrk/"
114#define kNeFSStepsExt ".step/"
115#define kNeFSApplicationExt ".app/"
116#define kNeFSJournalExt ".jrnl"
309 const Char* part_name);
336 kout <<
"Invalid: Journal stamp, using default name.\r";
349 if (!parser)
return NO;
360 if (!parser)
return NO;
383 if (!parser || !
mNode)
return NO;
398 (
Void)(
kout <<
"XML commit: " << xml_data <<
" to fork: " << journal_name <<
kendl);
#define _Output
Definition CompilerHint.h:15
#define _Input
Definition CompilerHint.h:14
#define _InOut
Definition CompilerHint.h:22
#define kendl
Definition DebugOutput.h:195
#define kout
Definition DebugOutput.h:189
#define NE_COPY_DELETE(KLASS)
Definition Detail.h:13
#define NE_MOVE_DELETE(KLASS)
Definition Detail.h:21
#define NE_COPY_DEFAULT(KLASS)
Definition Detail.h:17
#define kNeFSCatalogKindDir
Definition NeFS.h:60
#define kNeFSForkNameLen
Definition NeFS.h:111
#define kNeFSIdentLen
Definition NeFS.h:40
#define kNeFSPartLen
Definition NeFS.h:104
#define kNeFSMimeNameLen
Definition NeFS.h:110
#define kNeFSCatalogNameLen
Definition NeFS.h:32
#define kNeFSPadLen
Definition NeFS.h:42
@ kNeFSSolidStateDrive
Definition NeFS.h:124
@ kNeFSMassStorageDevice
Definition NeFS.h:126
@ kNeFSHardDrive
Definition NeFS.h:123
@ kNeFSFlashDrive
Definition NeFS.h:128
@ kNeFSUnknown
Definition NeFS.h:129
@ kNeFSScsiDrive
Definition NeFS.h:127
@ kNeFSDriveCount
Definition NeFS.h:130
@ kNeFSOpticalDrive
Definition NeFS.h:125
#define kNeFSJournalExt
Definition NeFS.h:116
@ kNeFSStatusError
Definition NeFS.h:136
@ kNeFSStatusLocked
Definition NeFS.h:135
@ kNeFSStatusInvalid
Definition NeFS.h:137
@ kNeFSStatusCount
Definition NeFS.h:138
@ kNeFSStatusUnlocked
Definition NeFS.h:134
STATIC const Char * Root()
STATIC const Char * UpDir()
Journal class for NeFS.
Definition NeFS.h:329
Bool CreateJournal(NeFileSystemParser *parser)
Definition NeFS.h:348
NeFileSystemJournal(const char *stamp=nullptr)
Definition NeFS.h:334
NEFS_CATALOG_STRUCT * mNode
Definition NeFS.h:331
Bool CommitJournal(NeFileSystemParser *parser, Char *xml_data, Char *journal_name)
Definition NeFS.h:382
Char mStamp[kNeFSCatalogNameLen]
Definition NeFS.h:407
Bool ReleaseJournal()
Definition NeFS.h:372
~NeFileSystemJournal()=default
Bool GetJournal(NeFileSystemParser *parser)
Definition NeFS.h:359
_Output Bool Seek(_Input _Output NEFS_CATALOG_STRUCT *catalog, SizeT off)
_Output Bool RemoveCatalog(_Input const Char *catalog)
_Output NEFS_FORK_STRUCT * FindFork(_Input NEFS_CATALOG_STRUCT *catalog, _Input const Char *name, Boolean data)
Find fork inside New filesystem.
_Output BOOL CreateFork(_Input NEFS_FORK_STRUCT &in)
Creates a new fork inside the NeFS partition.
UInt32 mDriveIndex
Definition NeFS.h:312
_Output Void CloseFork(_Input NEFS_FORK_STRUCT *fork)
_Output Void RemoveFork(_Input NEFS_FORK_STRUCT *fork)
_Output NEFS_CATALOG_STRUCT * CreateCatalog(_Input const Char *name)
_Output Bool CloseCatalog(_InOut NEFS_CATALOG_STRUCT *catalog)
_Output NEFS_CATALOG_STRUCT * CreateCatalog(_Input const Char *name, _Input const Int32 &flags, _Input const Int32 &kind)
_Output NEFS_CATALOG_STRUCT * GetCatalog(_Input const Char *name)
~NeFileSystemParser()=default
_Output NEFS_CATALOG_STRUCT * FindCatalog(_Input const Char *catalog_name, Lba &ou_lba, Bool search_hidden=YES, Bool local_search=NO)
_Output Bool WriteCatalog(_Input const Char *catalog, _Input Bool rsrc, _Input VoidPtr data, _Input SizeT sz, _Input const Char *name)
_Output VoidPtr ReadCatalog(_Input _Output NEFS_CATALOG_STRUCT *catalog, _Input Bool isRsrcFork, _Input SizeT dataSz, _Input const Char *forkName)
NeFileSystemParser()=default
_Output Bool Format(_Input _Output DriveTrait *drive, _Input const Int32 flags, const Char *part_name)
Make a EPM+NeFS drive out of the disk.
_Output SizeT Tell(_Input _Output NEFS_CATALOG_STRUCT *catalog)
Boolean fs_init_nefs(Void)
UPS inline definitions.
Definition Device.h:12
char Char
Definition Config.h:51
void Void
Definition Config.h:87
Size rt_string_len(const Char *str)
Definition AsciiUtils.cc:23
__UINT16_TYPE__ UInt16
Definition Config.h:40
__INT64_TYPE__ Int64
Definition Config.h:46
UInt64 Lba
Definition Config.h:90
__SIZE_TYPE__ SizeT
Definition Config.h:60
@ kNeFSSubDriveCount
Definition NeFS.h:242
@ kNeFSSubDriveInvalid
Definition NeFS.h:241
@ kNeFSSubDriveC
Definition NeFS.h:239
@ kNeFSSubDriveB
Definition NeFS.h:238
@ kNeFSSubDriveD
Definition NeFS.h:240
@ kNeFSSubDriveA
Definition NeFS.h:237
__UINT32_TYPE__ UInt32
Definition Config.h:44
void * VoidPtr
Definition Config.h:33
__INT32_TYPE__ Int32
Definition Config.h:38
bool Boolean
Definition Config.h:49
Int rt_copy_memory(const voidPtr src, voidPtr dst, Size len)
ASCII API =========================================================== ///.
Definition AsciiUtils.cc:86
__UINT64_TYPE__ UInt64
Definition Config.h:48
bool Bool
Definition Config.h:50
@ kNeFSDataForkKind
Definition NeFS.h:246
@ kNeFSRsrcForkKind
Definition NeFS.h:246
Media drive trait type.
Definition DriveMgr.h:54
Catalog record type.
Definition NeFS.h:142
BOOL ForkOrCatalog
Definition NeFS.h:143
Kernel::UInt16 CatalogFlags
Custom catalog flags.
Definition NeFS.h:155
Kernel::UInt16 Flags
Catalog flags.
Definition NeFS.h:149
Kernel::Lba NextPrevSibling
Definition NeFS.h:176
Kernel::Lba DataFork
Forks LBA.
Definition NeFS.h:167
Kernel::Lba NextSibling
Buddy allocation tracker.
Definition NeFS.h:171
Kernel::UInt16 Status
Catalog allocation status.
Definition NeFS.h:152
Kernel::Int32 Kind
Catalog kind.
Definition NeFS.h:158
Kernel::Lba NextBestSibling
Best-buddy tracker.
Definition NeFS.h:175
Kernel::Lba ResourceFork
Definition NeFS.h:168
Kernel::Lba DataForkSize
Size of the data fork.
Definition NeFS.h:161
Kernel::UInt32 Checksum
Definition NeFS.h:178
Kernel::Char Name[kNeFSCatalogNameLen]
Definition NeFS.h:145
Kernel::Lba ResourceForkSize
Size of all resource forks.
Definition NeFS.h:164
Kernel::Char Mime[kNeFSMimeNameLen]
Definition NeFS.h:146
Kernel::Lba PrevSibling
Definition NeFS.h:172
Fork type, contains a data page.
Definition NeFS.h:185
Kernel::Int32 Kind
Definition NeFS.h:192
Kernel::Char CatalogName[kNeFSCatalogNameLen]
Definition NeFS.h:189
BOOL ForkOrCatalog
Definition NeFS.h:186
Kernel::Lba PreviousSibling
Definition NeFS.h:202
Kernel::SizeT DataSize
Definition NeFS.h:199
Kernel::Int32 ResourceFlags
Definition NeFS.h:196
Kernel::Int64 ResourceId
Definition NeFS.h:194
Kernel::Int32 ResourceKind
Definition NeFS.h:195
Kernel::Char ForkName[kNeFSForkNameLen]
Definition NeFS.h:188
Kernel::Lba DataOffset
Definition NeFS.h:198
Kernel::Lba NextSibling
Data size according using sector count.
Definition NeFS.h:201
Kernel::Int32 Flags
Definition NeFS.h:191
Partition block type.
Definition NeFS.h:206
Kernel::UInt64 Version
Definition NeFS.h:224
Kernel::SizeT FreeCatalog
Definition NeFS.h:218
Kernel::Char Pad[kNeFSPadLen]
Definition NeFS.h:228
Kernel::SizeT FreeSectors
Definition NeFS.h:219
Kernel::SizeT DiskSize
Definition NeFS.h:216
Kernel::Lba StartCatalog
Definition NeFS.h:213
Kernel::Char Ident[kNeFSIdentLen]
Definition NeFS.h:207
Kernel::SizeT SectorCount
Definition NeFS.h:221
Kernel::Lba EpmBlock
Definition NeFS.h:226
Kernel::Int32 Flags
Definition NeFS.h:210
Kernel::Char PartitionName[kNeFSPartLen]
Definition NeFS.h:208
Kernel::SizeT SectorSize
Definition NeFS.h:222
Kernel::Int32 Kind
Definition NeFS.h:211
Kernel::SizeT CatalogCount
Definition NeFS.h:214