[ros-dev] Re: [ros-diffs] [weiden] 19842: get the root fcb when creating a file and no parent fcb is returned

Hartmut Birr osexpert at googlemail.com
Sat Dec 3 20:20:41 CET 2005


weiden at svn.reactos.com wrote:
> get the root fcb when creating a file and no parent fcb is returned
> Modified: trunk/reactos/drivers/fs/vfat/create.c
>   
> ------------------------------------------------------------------------
> *Modified: trunk/reactos/drivers/fs/vfat/create.c*
> --- trunk/reactos/drivers/fs/vfat/create.c	2005-12-03 17:33:41 UTC (rev 19841)
> +++ trunk/reactos/drivers/fs/vfat/create.c	2005-12-03 18:16:02 UTC (rev 19842)
> @@ -564,6 +564,11 @@
>  		    RequestedDisposition == FILE_SUPERSEDE)
>  		{
>  			ULONG Attributes;
>   
> +			if (ParentFcb == NULL)
> +			{
> +				ParentFcb = vfatOpenRootFCB (DeviceExt);
> +				ASSERT(ParentFcb != NULL);
> +			}
>   
>  			Attributes = Stack->Parameters.Create.FileAttributes;
>  
>  			vfatSplitPathName(&PathNameU, NULL, &FileNameU);
> @@ -600,7 +605,10 @@
>   
>  		}
>  		else
>  		{
>   
> -			vfatReleaseFCB (DeviceExt, ParentFcb);
>   
> +			if (ParentFcb)
> +			{
> +				vfatReleaseFCB (DeviceExt, ParentFcb);
> +			}
>   
>  			return(Status);
>  		}
>  	}
>   
I think, this change is wrong. If VfatOpenFile returns with an error and
without a parent fcb, we have to return the error.

- Hartmut


More information about the Ros-dev mailing list