Device: Find the VSA offset for Disk::Access::EntireDisk

This commit is contained in:
Paul Hollinsky
2022-02-28 15:55:16 -05:00
parent 1fadb85206
commit c314417277
5 changed files with 98 additions and 0 deletions
+12
View File
@@ -198,6 +198,18 @@ public:
*/
optional<uint64_t> getLogicalDiskSize();
/**
* Get the offset to the VSA filesystem within the logical disk, represented
* in bytes.
*
* This method is synchronous and consacts the device for the latest status
* if necessary.
*
* `icsneo::nullopt` will be returned if the device does not respond in a
* timely manner, or if the disk is disconnected/improperly configured.
*/
optional<uint64_t> getVSAOffsetInLogicalDisk();
/**
* Retrieve the number of Ethernet (DoIP) Activation lines present
* on this device.
+22
View File
@@ -0,0 +1,22 @@
#ifndef __FAT_H__
#define __FAT_H__
#ifdef __cplusplus
#include "icsneo/platform/optional.h"
#include <cstdint>
#include <functional>
namespace icsneo {
namespace Disk {
optional<uint64_t> FindVSAInFAT(std::function< optional<uint64_t>(uint64_t pos, uint8_t* into, uint64_t amount) > diskRead);
} // namespace Disk
} // namespace icsneo
#endif // __cplusplus
#endif // __FAT_H__