Lines Matching refs:NtData
1077 PNT_PRIVATE_DATA NtData = NULL; in nt_open() local
1106 NtData = (PNT_PRIVATE_DATA)malloc(sizeof(NT_PRIVATE_DATA)); in nt_open()
1108 if (NULL == NtData) in nt_open()
1124 io->private_data = NtData; in nt_open()
1134 RtlZeroMemory(NtData, sizeof(NT_PRIVATE_DATA)); in nt_open()
1136 NtData->magic = EXT2_ET_MAGIC_NT_IO_CHANNEL; in nt_open()
1137 NtData->BufferBlockNumber = 0xffffffff; in nt_open()
1138 NtData->BufferSize = 1024; in nt_open()
1139 NtData->Buffer = malloc(NtData->BufferSize); in nt_open()
1141 if (NULL == NtData->Buffer) in nt_open()
1151 …if(!_Ext2OpenDevice(name, (BOOLEAN)!BooleanFlagOn(flags, EXT2_FLAG_RW), &NtData->Handle, &NtData->… in nt_open()
1161 _GetDeviceSize(NtData->Handle, &FsSize); in nt_open()
1169 if(!NT_SUCCESS(_LockDrive(NtData->Handle)) /*|| !NT_SUCCESS(_DismountDrive(NtData->Handle))*/) in nt_open()
1171 NtData->OpenedReadonly = TRUE; in nt_open()
1196 if (NULL != NtData) in nt_open()
1198 if(NULL != NtData->Handle) in nt_open()
1200 _UnlockDrive(NtData->Handle); in nt_open()
1201 _CloseDisk(NtData->Handle); in nt_open()
1204 free(NtData->Buffer); in nt_open()
1205 free(NtData); in nt_open()
1222 PNT_PRIVATE_DATA NtData = NULL; in nt_close() local
1230 NtData = (PNT_PRIVATE_DATA) channel->private_data; in nt_close()
1231 EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL); in nt_close()
1241 if (NULL != NtData) in nt_close()
1243 if(NULL != NtData->Handle) in nt_close()
1245 _DismountDrive(NtData->Handle); in nt_close()
1246 _UnlockDrive(NtData->Handle); in nt_close()
1247 _CloseDisk(NtData->Handle); in nt_close()
1250 free(NtData->Buffer); in nt_close()
1251 free(NtData); in nt_close()
1267 PNT_PRIVATE_DATA NtData = NULL; in nt_set_blksize() local
1270 NtData = (PNT_PRIVATE_DATA) channel->private_data; in nt_set_blksize()
1271 EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL); in nt_set_blksize()
1277 free(NtData->Buffer); in nt_set_blksize()
1278 NtData->BufferBlockNumber = 0xffffffff; in nt_set_blksize()
1279 NtData->BufferSize = channel->block_size; in nt_set_blksize()
1280 ASSERT(0 == (NtData->BufferSize % 512)); in nt_set_blksize()
1282 NtData->Buffer = malloc(NtData->BufferSize); in nt_set_blksize()
1284 if (NULL == NtData->Buffer) in nt_set_blksize()
1308 PNT_PRIVATE_DATA NtData = NULL; in nt_read_blk() local
1312 NtData = (PNT_PRIVATE_DATA) channel->private_data; in nt_read_blk()
1313 EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL); in nt_read_blk()
1320 (block == NtData->BufferBlockNumber) && in nt_read_blk()
1321 (NtData->BufferBlockNumber != 0xffffffff)) in nt_read_blk()
1323 memcpy(buf, NtData->Buffer, channel->block_size); in nt_read_blk()
1335 if(Size <= NtData->BufferSize) in nt_read_blk()
1341 NtData->BufferBlockNumber = block; in nt_read_blk()
1342 BufferToRead = NtData->Buffer; in nt_read_blk()
1343 SizeToRead = NtData->BufferSize; in nt_read_blk()
1352 if(!_RawRead(NtData->Handle, Offset, SizeToRead, BufferToRead, &Errno)) in nt_read_blk()
1388 PNT_PRIVATE_DATA NtData = NULL; in nt_write_blk() local
1392 NtData = (PNT_PRIVATE_DATA) channel->private_data; in nt_write_blk()
1393 EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL); in nt_write_blk()
1395 if(NtData->OpenedReadonly) in nt_write_blk()
1406 NtData->BufferBlockNumber = 0xffffffff; in nt_write_blk()
1422 if(!_RawWrite(NtData->Handle, Offset, SizeToWrite, buf, &Errno)) in nt_write_blk()
1440 if(SizeToWrite >= NtData->BufferSize) in nt_write_blk()
1442 NtData->BufferBlockNumber = block; in nt_write_blk()
1443 memcpy(NtData->Buffer, buf, NtData->BufferSize); in nt_write_blk()
1446 NtData->Written = TRUE; in nt_write_blk()
1463 PNT_PRIVATE_DATA NtData = NULL; in nt_flush() local
1466 NtData = (PNT_PRIVATE_DATA) channel->private_data; in nt_flush()
1467 EXT2_CHECK_MAGIC(NtData, EXT2_ET_MAGIC_NT_IO_CHANNEL); in nt_flush()
1469 if(NtData->OpenedReadonly) in nt_flush()
1479 _FlushDrive(NtData->Handle); in nt_flush()
1486 if(NtData->Written) in nt_flush()
1488 _SetPartType(NtData->Handle, 0x83); in nt_flush()