winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
844 discussions
Start a n
N
ew thread
Andrew Talbot : oleaut32: Replace inline static with static inline.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: cae5c216a568b61883d70c44b0bb00b317ba27be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cae5c216a568b61883d70c44b…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Mar 22 18:29:03 2007 +0000 oleaut32: Replace inline static with static inline. --- dlls/oleaut32/vartype.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index 1b2199c..54b389a 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -144,7 +144,7 @@ static HRESULT VARIANT_FromDisp(IDispatch* pdispIn, LCID lcid, void* pOut, } /* Inline return type */ -#define RETTYP inline static HRESULT +#define RETTYP static inline HRESULT /* Simple compiler cast from one type to another */
1
0
0
0
Andrew Talbot : ole32: Replace inline static with static inline.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: 24a197490c73990085c397adaf4c86c77a92294f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24a197490c73990085c397ada…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Mar 22 18:24:53 2007 +0000 ole32: Replace inline static with static inline. --- dlls/ole32/marshal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 490b762..55afade 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -68,7 +68,7 @@ static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt, * IPIDs identify an interface stub and are apartment scoped */ -inline static HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf) +static inline HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf) { HRESULT hr; CLSID clsid;
1
0
0
0
Andrew Talbot : msvcrt/tests: Replace inline static with static inline.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: 1e8e0a4ed2771d1d50a082de29ef2b9dd4353932 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e8e0a4ed2771d1d50a082de2…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Mar 22 18:22:51 2007 +0000 msvcrt/tests: Replace inline static with static inline. --- dlls/msvcrt/tests/cpp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index b9acbb1..1d43502 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -126,7 +126,7 @@ static void* bAncientVersion; /* Emulate a __thiscall */ #ifdef _MSC_VER -inline static void* do_call_func1(void *func, void *_this) +static inline void* do_call_func1(void *func, void *_this) { volatile void* retval = 0; __asm @@ -140,7 +140,7 @@ inline static void* do_call_func1(void *func, void *_this) return (void*)retval; } -inline static void* do_call_func2(void *func, void *_this, const void* arg) +static inline void* do_call_func2(void *func, void *_this, const void* arg) { volatile void* retval = 0; __asm
1
0
0
0
Andrew Talbot : shell32: Replace inline static with static inline.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: 55355d2def15f9cfd5cdf4a6834f19fefb68b450 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55355d2def15f9cfd5cdf4a68…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Mar 22 18:27:53 2007 +0000 shell32: Replace inline static with static inline. --- dlls/shell32/shell32_main.h | 10 +++++----- dlls/shell32/shelllink.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index 2937065..c974c8e 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -175,7 +175,7 @@ BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCSTR dwTypeData, UINT fState); -inline static BOOL SHELL_OsIsUnicode(void) +static inline BOOL SHELL_OsIsUnicode(void) { /* if high-bit of version is 0, we are emulating NT */ return !(GetVersion() & 0x80000000); @@ -186,26 +186,26 @@ inline static BOOL SHELL_OsIsUnicode(void) SHFree(*ptr); \ *ptr = NULL; \ }; -inline static void __SHCloneStrA(char ** target,const char * source) +static inline void __SHCloneStrA(char ** target,const char * source) { *target = SHAlloc(strlen(source)+1); strcpy(*target, source); } -inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source) +static inline void __SHCloneStrWtoA(char ** target, const WCHAR * source) { int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL); *target = SHAlloc(len); WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL); } -inline static void __SHCloneStrW(WCHAR ** target, const WCHAR * source) +static inline void __SHCloneStrW(WCHAR ** target, const WCHAR * source) { *target = SHAlloc( (lstrlenW(source)+1) * sizeof(WCHAR) ); lstrcpyW(*target, source); } -inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) +static inline WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) { int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); *target = SHAlloc(len*sizeof(WCHAR)); diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 61885ed..f7c9c59 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -201,7 +201,7 @@ static inline IShellLinkImpl *impl_from_IObjectWithSite( IObjectWithSite *iface static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath); /* strdup on the process heap */ -inline static LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) +static inline LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) { INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) ); @@ -211,7 +211,7 @@ inline static LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) return p; } -inline static LPWSTR strdupW( LPCWSTR src ) +static inline LPWSTR strdupW( LPCWSTR src ) { LPWSTR dest; if (!src) return NULL;
1
0
0
0
Andrew Talbot : msi: Replace inline static with static inline.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: efc988e1c817edfbe7c74c77b331835ed3e673ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=efc988e1c817edfbe7c74c77b…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Mar 22 18:21:52 2007 +0000 msi: Replace inline static with static inline. --- dlls/msi/msipriv.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 971f71e..d61eab9 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -825,7 +825,7 @@ static inline BOOL msi_free( void *mem ) return HeapFree( GetProcessHeap(), 0, mem ); } -inline static char *strdupWtoA( LPCWSTR str ) +static inline char *strdupWtoA( LPCWSTR str ) { LPSTR ret = NULL; DWORD len; @@ -838,7 +838,7 @@ inline static char *strdupWtoA( LPCWSTR str ) return ret; } -inline static LPWSTR strdupAtoW( LPCSTR str ) +static inline LPWSTR strdupAtoW( LPCSTR str ) { LPWSTR ret = NULL; DWORD len; @@ -851,7 +851,7 @@ inline static LPWSTR strdupAtoW( LPCSTR str ) return ret; } -inline static LPWSTR strdupW( LPCWSTR src ) +static inline LPWSTR strdupW( LPCWSTR src ) { LPWSTR dest; if (!src) return NULL;
1
0
0
0
Alessandro Pignotti : dplayx: Corrected the way nameserver initializes the sessiondesc structure on broadcast request reply .
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: 7169718d6e570b964bea9c9d6db018ecb1f69a69 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7169718d6e570b964bea9c9d6…
Author: Alessandro Pignotti <alex.pigna(a)inventati.org> Date: Thu Mar 22 17:20:17 2007 +0100 dplayx: Corrected the way nameserver initializes the sessiondesc structure on broadcast request reply. --- dlls/dplayx/name_server.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dplayx/name_server.c b/dlls/dplayx/name_server.c index c731ea6..f46af67 100644 --- a/dlls/dplayx/name_server.c +++ b/dlls/dplayx/name_server.c @@ -410,7 +410,7 @@ void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, rmsg->envelope.wVersion = DPMSGVER_DP6; CopyMemory( &rmsg->sd, lpDP->dp2->lpSessionDesc, - sizeof( lpDP->dp2->lpSessionDesc->dwSize ) ); + lpDP->dp2->lpSessionDesc->dwSize ); rmsg->dwUnknown = 0x0000005c; if( bAnsi ) {
1
0
0
0
Alexandre Julliard : server: Print the callback function in the APC_ASYNC_IO trace.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: 28a9374323f18e460302e87fae8173bb5478f4c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28a9374323f18e460302e87fa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 23 11:49:59 2007 +0100 server: Print the callback function in the APC_ASYNC_IO trace. --- server/trace.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/trace.c b/server/trace.c index 2ea1860..a332821 100644 --- a/server/trace.c +++ b/server/trace.c @@ -116,8 +116,9 @@ static void dump_apc_call( const apc_call_t *call ) fprintf( stderr, ",arg=%p", call->timer.arg ); break; case APC_ASYNC_IO: - fprintf( stderr, "APC_ASYNC_IO,user=%p,sb=%p,status=%s", - call->async_io.user, call->async_io.sb, get_status_name(call->async_io.status) ); + fprintf( stderr, "APC_ASYNC_IO,func=%p,user=%p,sb=%p,status=%s", + call->async_io.func, call->async_io.user, call->async_io.sb, + get_status_name(call->async_io.status) ); break; case APC_VIRTUAL_ALLOC: fprintf( stderr, "APC_VIRTUAL_ALLOC,addr=%p,size=%lu,zero_bits=%u,op_type=%x,prot=%x",
1
0
0
0
Alexandre Julliard : server: Implement the open_file method for named pipes .
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: de1866d4fd6a19317014ce94e5bbfdd0dae7cc4b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=de1866d4fd6a19317014ce94e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 22 16:47:46 2007 +0100 server: Implement the open_file method for named pipes. Get rid of the open_named_pipe request, we can now use a normal open_file_object. --- dlls/ntdll/file.c | 23 ------ include/wine/server_protocol.h | 22 +------ server/named_pipe.c | 146 ++++++++++++++++++---------------------- server/protocol.def | 12 --- server/request.h | 2 - server/trace.c | 18 ----- 6 files changed, 67 insertions(+), 156 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=de1866d4fd6a19317014c…
1
0
0
0
Alexandre Julliard : server: Implement the open_file method for mailslots.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: 806bb49edaf60182ca6d464262949a3004be7930 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=806bb49edaf60182ca6d46426…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 22 16:36:54 2007 +0100 server: Implement the open_file method for mailslots. Get rid of the open_mailslot request, we can now use a normal open_file_object. --- dlls/ntdll/file.c | 23 -------- include/wine/server_protocol.h | 22 +------- server/mailslot.c | 119 ++++++++++++++-------------------------- server/protocol.def | 12 ---- server/request.h | 2 - server/trace.c | 18 ------ 6 files changed, 43 insertions(+), 153 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=806bb49edaf60182ca6d4…
1
0
0
0
Alexandre Julliard : ntdll: Better support for NT path names in wine_nt_to_unix_file_name.
by Alexandre Julliard
23 Mar '07
23 Mar '07
Module: wine Branch: master Commit: ee478bbada340f3bcedfb5aaca0246be74a74140 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee478bbada340f3bcedfb5aac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 22 16:35:51 2007 +0100 ntdll: Better support for NT path names in wine_nt_to_unix_file_name. Don't map NT namespace 1:1 to Unix, add a magic \??\unix device instead. More generic support for \??\ devices, with fallback to the wineserver for paths that don't exist. --- dlls/ntdll/directory.c | 118 +++++++++++++++++++++++++++--------------------- 1 files changed, 67 insertions(+), 51 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index f03a7b4..e60dad7 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1799,7 +1799,7 @@ static inline int get_dos_prefix_len( const UNICODE_STRING *name ) NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, UINT disposition, BOOLEAN check_case ) { - static const WCHAR uncW[] = {'U','N','C','\\'}; + static const WCHAR unixW[] = {'u','n','i','x'}; static const WCHAR invalid_charsW[] = { INVALID_NT_CHARS, 0 }; NTSTATUS status = STATUS_SUCCESS; @@ -1807,71 +1807,87 @@ NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *un const WCHAR *name, *p; struct stat st; char *unix_name; - int pos, ret, name_len, unix_len, used_default; + int pos, ret, name_len, unix_len, prefix_len, used_default; + WCHAR prefix[MAX_DIR_ENTRY_LEN]; + BOOLEAN is_unix = FALSE; name = nameW->Buffer; name_len = nameW->Length / sizeof(WCHAR); if (!name_len || !IS_SEPARATOR(name[0])) return STATUS_OBJECT_PATH_SYNTAX_BAD; - if ((pos = get_dos_prefix_len( nameW ))) + if (!(pos = get_dos_prefix_len( nameW ))) + return STATUS_BAD_DEVICE_TYPE; /* no DOS prefix, assume NT native name */ + + name += pos; + name_len -= pos; + + /* check for sub-directory */ + for (pos = 0; pos < name_len; pos++) { - BOOLEAN is_unc = FALSE; + if (IS_SEPARATOR(name[pos])) break; + if (name[pos] < 32 || strchrW( invalid_charsW, name[pos] )) + return STATUS_OBJECT_NAME_INVALID; + } + if (pos > MAX_DIR_ENTRY_LEN) + return STATUS_OBJECT_NAME_INVALID; - name += pos; - name_len -= pos; + if (pos == name_len) /* no subdir, plain DOS device */ + return get_dos_device( name, name_len, unix_name_ret ); - /* check for UNC prefix */ - if (name_len > 4 && !memicmpW( name, uncW, 4 )) - { - name += 3; - name_len -= 3; - is_unc = TRUE; - } - else - { - /* check for a drive letter with path */ - if (name_len < 3 || !isalphaW(name[0]) || name[1] != ':' || !IS_SEPARATOR(name[2])) - { - /* not a drive with path, try other DOS devices */ - return get_dos_device( name, name_len, unix_name_ret ); - } - name += 2; /* skip drive letter */ - name_len -= 2; - } + for (prefix_len = 0; prefix_len < pos; prefix_len++) + prefix[prefix_len] = tolowerW(name[prefix_len]); - /* check for invalid characters */ + name += prefix_len; + name_len -= prefix_len; + + /* check for invalid characters (all chars except 0 are valid for unix) */ + is_unix = (prefix_len == 4 && !memcmp( prefix, unixW, sizeof(unixW) )); + if (is_unix) + { + for (p = name; p < name + name_len; p++) + if (!*p) return STATUS_OBJECT_NAME_INVALID; + check_case = TRUE; + } + else + { for (p = name; p < name + name_len; p++) if (*p < 32 || strchrW( invalid_charsW, *p )) return STATUS_OBJECT_NAME_INVALID; + } - unix_len = ntdll_wcstoumbs( 0, name, name_len, NULL, 0, NULL, NULL ); - unix_len += MAX_DIR_ENTRY_LEN + 3; - unix_len += strlen(config_dir) + sizeof("/dosdevices/") + 3; - if (!(unix_name = RtlAllocateHeap( GetProcessHeap(), 0, unix_len ))) - return STATUS_NO_MEMORY; - strcpy( unix_name, config_dir ); - strcat( unix_name, "/dosdevices/" ); - pos = strlen(unix_name); - if (is_unc) - { - strcpy( unix_name + pos, "unc" ); - pos += 3; - } - else - { - unix_name[pos++] = tolowerW( name[-2] ); - unix_name[pos++] = ':'; - unix_name[pos] = 0; - } + unix_len = ntdll_wcstoumbs( 0, prefix, prefix_len, NULL, 0, NULL, NULL ); + unix_len += ntdll_wcstoumbs( 0, name, name_len, NULL, 0, NULL, NULL ); + unix_len += MAX_DIR_ENTRY_LEN + 3; + unix_len += strlen(config_dir) + sizeof("/dosdevices/"); + if (!(unix_name = RtlAllocateHeap( GetProcessHeap(), 0, unix_len ))) + return STATUS_NO_MEMORY; + strcpy( unix_name, config_dir ); + strcat( unix_name, "/dosdevices/" ); + pos = strlen(unix_name); + + ret = ntdll_wcstoumbs( 0, prefix, prefix_len, unix_name + pos, unix_len - pos - 1, + NULL, &used_default ); + if (!ret || used_default) + { + RtlFreeHeap( GetProcessHeap(), 0, unix_name ); + return STATUS_OBJECT_NAME_INVALID; } - else /* no DOS prefix, assume NT native name, map directly to Unix */ + pos += ret; + + /* check if prefix exists (except for DOS drives to avoid extra stat calls) */ + + if (prefix_len != 2 || prefix[1] != ':') { - if (!name_len || !IS_SEPARATOR(name[0])) return STATUS_OBJECT_NAME_INVALID; - unix_len = ntdll_wcstoumbs( 0, name, name_len, NULL, 0, NULL, NULL ); - unix_len += MAX_DIR_ENTRY_LEN + 3; - if (!(unix_name = RtlAllocateHeap( GetProcessHeap(), 0, unix_len ))) - return STATUS_NO_MEMORY; - pos = 0; + unix_name[pos] = 0; + if (lstat( unix_name, &st ) == -1 && errno == ENOENT) + { + if (!is_unix) + { + RtlFreeHeap( GetProcessHeap(), 0, unix_name ); + return STATUS_BAD_DEVICE_TYPE; + } + pos = 0; /* fall back to unix root */ + } } /* try a shortcut first */
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
85
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Results per page:
10
25
50
100
200