chore(xo-server/vhd): add format cheatsheet

This commit is contained in:
Julien Fontanet 2018-03-14 15:51:02 +01:00
parent 301ab65c01
commit 596bd12f59

View File

@ -183,6 +183,24 @@ function checksumStruct (rawStruct, struct) {
// =================================================================== // ===================================================================
// Format:
//
// - Footer (512)
// - Header (1024)
//
// - BAT (batSize @ header.tableOffset)
// - Block i (@ blockOffset(i))
// - bitmap (blockBitmapSize)
// - data (header.blockSize)
//
// - Footer (512)
//
// Variables:
//
// - batSize = min(1, ceil(header.maxTableEntries * 4)) * sectorSize
// - blockBitmapSize = ceil(header.blockSize / sectorSize / 8 / sectorSize) * sectorSize
// - blockOffset(i) = bat[i] * sectorSize
// - sectorSize = 512
export class Vhd { export class Vhd {
constructor (handler, path) { constructor (handler, path) {
this._handler = handler this._handler = handler