[PATCH 5/6]: msvcp110: Add tr2_sys__Lstat implementation and test.(resend)

YongHao Hu christopherwuy at gmail.com
Fri Jul 3 10:29:17 CDT 2015


Hi.

On 15/7/3 下午6:51, Piotr Caban wrote:
> On 07/03/15 06:00, YongHaoHu wrote:
>> +/* ?_Lstat at sys@tr2 at std@@YA?AW4file_type at 123@PBDAAH at Z */
>> +/* ?_Lstat at sys@tr2 at std@@YA?AW4file_type at 123@PEBDAEAH at Z */
>> +file_type tr2_sys__Lstat(char const* path, int *err_code)
>> +{
>> +    DWORD attr;
>> +    TRACE("(%s %p)\n", debugstr_a(path), err_code);
>> +    if(!path) {
>> +        *err_code = ERROR_INVALID_PARAMETER;
>> +        return status_unknown;
>> +    }
>> +
>> +    attr = GetFileAttributesA(path);
>> +    if(attr == INVALID_FILE_ATTRIBUTES)
>> +        return stat_set_error(err_code);
>> +    if(attr & FILE_ATTRIBUTE_REPARSE_POINT)
>> +        FIXME("reparse point is not supported yet\n");
>> +
>> +    *err_code = ERROR_SUCCESS;
>> +    return (attr & 
>> FILE_ATTRIBUTE_DIRECTORY)?directory_file:regular_file;
>> +}
> What's the reason for not calling tr2_sys__Stat function here?
>
The handling of REPARSE_POINT in tr2_sys__Stat  is different from 
tr2_sys__Lstat, so we need to implement it again.
That's why I want to reuse my function stat_set_error.
Regarding ERROR_SUCCESS, I handle it wrong.
Thank you. ;)



More information about the wine-devel mailing list