EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How do I set the IsCorrupted flag (for testing purposes) ?

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#34451
Posted: 09/14/2015 08:15:43
by Miguel De Buf (Priority Standard support level)
Joined: 01/04/2007
Posts: 32

Hi,

I would like to set the IsCorrupted flag om an image, so I can use that image to test code that runs when an image is corrupted. I know that the flag is just a bit somewhere in the first (or second) page.

1. Where exactly can I find the flag, and how can I set it ?
2. If I set it, will checkandrepair() be executed as if the image was really corrupted ?

Thanks,
Miguel
#34452
Posted: 09/14/2015 09:38:00
by Alexander Plas (EldoS Corp.)

Hello

Would you like to manually change the bit which is indicate the storage corruption?

Actually I don't see any sense in it. This bit is only reported by IsCorrupted property and has no impact on any other activity of SolFS engine. CheckAndRepair method just clean this bit before exiting and doesn't analyze it before.
#34457
Posted: 09/14/2015 11:18:17
by Miguel De Buf (Priority Standard support level)
Joined: 01/04/2007
Posts: 32

1. Yes, I would like to do that. I have code that monitors the IsCorrupted flag, so for testing purposes, it would be great if I can do that. Unless you know of another way to easily and quickly create corrupt storage.

2. So you say that checkandrepair() is independent of the IsCorrupted flag (it just clears the flag at the end) ? In that case, I can run checkandrepair() on an image that does not have the IsCorrupted flag set, right ?
#34474
Posted: 09/16/2015 03:46:26
by Alexander Plas (EldoS Corp.)

Quote
Miguel De Buf wrote:
1. Yes, I would like to do that. I have code that monitors the IsCorrupted flag, so for testing purposes, it would be great if I can do that. Unless you know of another way to easily and quickly create corrupt storage.


The flag is located on the second page of the storage, it is first bit in quad-byte word at offset 242.

Quote
2. So you say that checkandrepair() is independent of the IsCorrupted flag (it just clears the flag at the end) ? In that case, I can run checkandrepair() on an image that does not have the IsCorrupted flag set, right ?


Yes, you can.

Reply

Statistics

Topic viewed 4082 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!