TempleOSTS_140317.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:02 +02:00
1 parent 2d2a65d572
commit 7ef616a20e
1416 files changed
+223873 -53917

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
U0 RawAccess(I64 drv_let=0)
{
CPrt *p=Drv2Prt(drv_let);
CBlkDev *bdev=Drv2BlkDev(drv_let);
I64 blk,old_offset,old_size;
U8 *buf=MAlloc(BLK_SIZE);
PrtRep;
PressAKey;
ClassRep(p);
PressAKey;
ClassRep(bdev);
PressAKey;
//Temporarily change partition range to full device.
//Normally, you are limited to just your partition.
//This is obviously $BK,1$dangerous$BK,0$!
old_offset=p->offset;
old_size =p->size;
p->offset=bdev->min_blk;
p->size=bdev->max_blk-bdev->min_blk+1;
try {
blk=PmtI64("Blk to Read: ",old_offset,bdev->min_blk,bdev->max_blk);
RBlks(p,buf,blk,1);
D(buf,BLK_SIZE);
} catch
PutExcept;
p->offset=old_offset;
p->size =old_size;
Free(buf);
}
RawAccess;
//See $LK,"RBlks",A="MN:RBlks"$(), $LK,"WBlks",A="MN:WBlks"$(), $LK,"PrtLock",A="MN:PrtLock"$(), $LK,"PrtUnlock",A="MN:PrtUnlock"$()
//$LK,"DBlk",A="MN:DBlk"$(), $LK,"DCluster",A="MN:DCluster"$(), $LK,"BlkDevLock",A="MN:BlkDevLock"$() and $LK,"BlkDevUnlock",A="MN:BlkDevUnlock"$().