PVFATFCB pDirFcb, pFcb;
LARGE_INTEGER Offset;
+/*
DPRINT ("updEntry PathFileName \'%S\'\n",
((PVFATCCB)(pFileObject->FsContext2))->pFcb->PathName);
+*/
pFcb = (PVFATFCB)pFileObject->FsContext;
assert (pFcb);
return FALSE;
}
// clear the new dir cluster
- FileOffset.u.LowPart = pDirFcb->RFCB.FileSize.QuadPart -
- DeviceExt->FatInfo.BytesPerCluster;
+ FileOffset.u.LowPart = (DWORD)(pDirFcb->RFCB.FileSize.QuadPart -
+ DeviceExt->FatInfo.BytesPerCluster);
CcMapData (pDirFcb->FileObject, &FileOffset, DeviceExt->FatInfo.BytesPerCluster,
TRUE, &Context, (PVOID*)&pFatEntry);
RtlZeroMemory(pFatEntry, DeviceExt->FatInfo.BytesPerCluster);
{
if (PathFileName[i] == L'\\')
{
- posCar = i;
+ posCar = (short)i;
}
}
if (posCar == -1)
{
if (FileName[i] == '.')
{
- posCar = i;
+ posCar = (short)i;
if (i == j)
{
j++;
}
if (!posCar)
{
- posCar = i;
+ posCar = (short)i;
}
if (posCar < j)
{
- posCar = i;
+ posCar = (short)i;
needTilde = TRUE;
}
if (posCar > 8)
//try first with xxxxxx~y.zzz
for (i = 1; i < 10; i++)
{
- DirName[posCar-1] = '0' + i;
- pEntry->Filename[posCar - 1] = '0' + i;
+ DirName[posCar-1] = (WCHAR)('0' + i);
+ pEntry->Filename[posCar - 1] = (unsigned char)('0' + i);
Status = FindFile (DeviceExt, &FileFcb, pDirFcb, DirName, NULL, NULL);
if (!NT_SUCCESS(Status))
{
if (needLong)
{
// calculate checksum for 8.3 name
- for (pSlots[0].alias_checksum = i = 0; i < 11; i++)
+ for (pSlots[0].alias_checksum = 0, i = 0; i < 11; i++)
{
pSlots[0].alias_checksum = (((pSlots[0].alias_checksum & 1) << 7
| ((pSlots[0].alias_checksum & 0xfe) >> 1))
if (RequestedOptions & FILE_DIRECTORY_FILE)
{
CurrentCluster = 0xffffffff;
- Status = NextCluster (DeviceExt, NULL, 0, &CurrentCluster, TRUE);
+ Status = NextCluster (DeviceExt, 0, &CurrentCluster, TRUE);
if (CurrentCluster == 0xffffffff || !NT_SUCCESS(Status))
{
vfatReleaseFCB(DeviceExt, pDirFcb);
}
if (DeviceExt->FatInfo.FatType == FAT32)
{
- pEntry->FirstClusterHigh = CurrentCluster >> 16;
+ pEntry->FirstClusterHigh = (unsigned short)(CurrentCluster >> 16);
}
- pEntry->FirstCluster = CurrentCluster;
+ pEntry->FirstCluster = (unsigned short)CurrentCluster;
}
size = DeviceExt->FatInfo.BytesPerCluster / sizeof(FATDirEntry);
CcMapData (pDirFcb->FileObject, &FileOffset,
nbSlots * sizeof(FATDirEntry) - size,
TRUE, &Context, (PVOID*)&pFatEntry);
- memcpy(pFatEntry, (PVOID)Buffer + size, nbSlots * sizeof(FATDirEntry) - size);
+ memcpy(pFatEntry, (PVOID)(Buffer + size), nbSlots * sizeof(FATDirEntry) - size);
}
CcSetDirtyPinnedData(Context, NULL);
CcUnpinData(Context);
PVFATFCB pFcb = NULL, pDirFcb = NULL;
NTSTATUS status;
PWSTR pName;
- ULONG Entry = 0, startEntry, Read, CurrentCluster, NextCluster, i;
- FATDirEntry DirEntry;
+ ULONG Entry = 0, startEntry, CurrentCluster, NextCluster, i;
DPRINT ("delEntry PathFileName \'%S\'\n", pFileObject->FileName.Buffer);