mirror of
https://github.com/reactos/reactos.git
synced 2024-08-12 22:26:31 +00:00
Fixed bug in ReadVolumeLabel().
svn path=/trunk/; revision=2101
This commit is contained in:
parent
5844ee0a81
commit
6bad760721
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: create.c,v 1.28 2001/07/18 12:04:52 ekohl Exp $
|
/* $Id: create.c,v 1.29 2001/07/25 08:58:21 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -227,11 +227,18 @@ ReadVolumeLabel (PDEVICE_EXTENSION DeviceExt, PVPB Vpb)
|
||||||
NextCluster = 0;
|
NextCluster = 0;
|
||||||
|
|
||||||
block = ExAllocatePool (NonPagedPool, BLOCKSIZE);
|
block = ExAllocatePool (NonPagedPool, BLOCKSIZE);
|
||||||
DPRINT ("FindFile : start at sector %lx, entry %ld\n", StartingSector, i);
|
DPRINT ("ReadVolumeLabel : start at sector %lx, entry %ld\n", StartingSector, i);
|
||||||
for (j = 0; j < Size; j++)
|
for (j = 0; j < Size; j++)
|
||||||
{
|
{
|
||||||
/* FIXME: Check status */
|
/* FIXME: Check status */
|
||||||
VfatReadSectors (DeviceExt->StorageDevice, StartingSector, 1, block);
|
Status = VfatReadSectors (DeviceExt->StorageDevice, StartingSector, 1, block);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
*(Vpb->VolumeLabel) = 0;
|
||||||
|
Vpb->VolumeLabelLength = 0;
|
||||||
|
ExFreePool(block);
|
||||||
|
return(Status);
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < ENTRIES_PER_SECTOR; i++)
|
for (i = 0; i < ENTRIES_PER_SECTOR; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue