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
October 2006
----- 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
1032 discussions
Start a n
N
ew thread
Francois Gouget : mshtml: Remove space before '\n'.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: 5f925d421c2b7bb024430c772d1d4582fbbd920e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=5f925d421c2b7bb024430c7…
Author: Francois Gouget <fgouget(a)free.fr> Date: Tue Oct 3 14:09:01 2006 +0200 mshtml: Remove space before '\n'. --- dlls/mshtml/tests/htmldoc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 19151a0..6a4a4da 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -1728,7 +1728,7 @@ static void test_readyState(IUnknown *un return; hres = IHTMLDocument2_get_readyState(htmldoc, NULL); - ok(hres == E_POINTER, "get_readyState failed: %08lx, expected \n", hres); + ok(hres == E_POINTER, "get_readyState failed: %08lx, expected\n", hres); hres = IHTMLDocument2_get_readyState(htmldoc, &state); ok(hres == S_OK, "get_ReadyState failed: %08lx\n", hres);
1
0
0
0
Dmitry Timoshkov : ntdll: Make test_debug_regs() print the actual Dr7 value it got.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: 66da242bfe6186dd75757f03f05aa4ee161ae4d7 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=66da242bfe6186dd75757f0…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Oct 3 18:10:13 2006 +0900 ntdll: Make test_debug_regs() print the actual Dr7 value it got. --- dlls/ntdll/tests/exception.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 1d00816..0639e74 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -277,8 +277,8 @@ static void test_debug_regs(void) pNtCurrentTeb()->Tib.ExceptionList = exc_frame.frame.Prev; ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; res = pNtGetContextThread(GetCurrentThread(), &ctx); - ok (res == STATUS_SUCCESS,"NtGetContextThread failed with %lx", res); - ok(ctx.Dr7 == 0x155,"failed to set debugregister 7 to 0x155"); + ok(res == STATUS_SUCCESS,"NtGetContextThread failed with %lx\n", res); + ok(ctx.Dr7 == 0x155,"failed to set debugregister 7 to 0x155, got %lx\n", ctx.Dr7); } #endif /* __i386__ */
1
0
0
0
Michael Stefaniuc : winedos: Win64 printf format warning fixes.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: db4eaf5e6fefbea6d0a811da140faa790260ff29 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=db4eaf5e6fefbea6d0a811d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Oct 3 14:04:49 2006 +0200 winedos: Win64 printf format warning fixes. --- dlls/winedos/Makefile.in | 1 - dlls/winedos/dma.c | 8 ++-- dlls/winedos/dosaspi.c | 6 ++- dlls/winedos/dosvm.c | 24 ++++++------ dlls/winedos/int10.c | 2 + dlls/winedos/int13.c | 4 +- dlls/winedos/int1a.c | 2 + dlls/winedos/int21.c | 50 +++++++++++++------------- dlls/winedos/int25.c | 4 +- dlls/winedos/int26.c | 4 +- dlls/winedos/int2f.c | 18 +++++---- dlls/winedos/int31.c | 30 ++++++++------- dlls/winedos/interrupts.c | 30 ++++++++------- dlls/winedos/ioports.c | 2 + dlls/winedos/module.c | 4 +- dlls/winedos/soundblaster.c | 2 + dlls/winedos/vxd.c | 84 ++++++++++++++++++++++--------------------- dlls/winedos/xms.c | 2 + 18 files changed, 138 insertions(+), 139 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=db4eaf5e6fefbea6d0a…
1
0
0
0
Oleg Krylov : user: Fix CopyImage function declaration.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: dd6e2b361d0be5b10c0373f896a67b9ac712dc2c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=dd6e2b361d0be5b10c0373f…
Author: Oleg Krylov <oleg.krylov(a)gmail.com> Date: Tue Oct 3 13:07:50 2006 +0300 user: Fix CopyImage function declaration. --- dlls/user/cursoricon.c | 4 ++-- include/winuser.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/user/cursoricon.c b/dlls/user/cursoricon.c index e056366..3b15b99 100644 --- a/dlls/user/cursoricon.c +++ b/dlls/user/cursoricon.c @@ -2308,7 +2308,7 @@ HANDLE WINAPI LoadImageW( HINSTANCE hins * if the source is a DIB section. * The LR_MONOCHROME flag is ignored if LR_CREATEDIBSECTION is present. */ -HICON WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx, +HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags ) { TRACE("hnd=%p, type=%u, desiredx=%d, desiredy=%d, flags=%x\n", @@ -2492,7 +2492,7 @@ HICON WINAPI CopyImage( HANDLE hnd, UINT } } HeapFree(GetProcessHeap(), 0, bi); - return (HICON)res; + return res; } case IMAGE_ICON: return CURSORICON_ExtCopy(hnd,type, desiredx, desiredy, flags); diff --git a/include/winuser.h b/include/winuser.h index 14d36e5..d5a8e9b 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -4215,7 +4215,7 @@ BOOL WINAPI CloseWindow(HWND); BOOL WINAPI CloseWindowStation(HWINSTA); #define CopyCursor(cur) ((HCURSOR)CopyIcon((HICON)(cur))) HICON WINAPI CopyIcon(HICON); -HICON WINAPI CopyImage(HANDLE,UINT,INT,INT,UINT); +HANDLE WINAPI CopyImage(HANDLE,UINT,INT,INT,UINT); BOOL WINAPI CopyRect(RECT*,const RECT*); INT WINAPI CountClipboardFormats(void); BOOL WINAPI CreateCaret(HWND,HBITMAP,INT,INT);
1
0
0
0
Mikołaj Zalewski : comdlg32: Load "Save" string from resources in filedlgbrowser.c.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: 06f9c79739fb7054bb170699183d779b81a9eb57 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=06f9c79739fb7054bb17069…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Tue Oct 3 10:41:09 2006 +0200 comdlg32: Load "Save" string from resources in filedlgbrowser.c. --- dlls/comdlg32/filedlgbrowser.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/comdlg32/filedlgbrowser.c b/dlls/comdlg32/filedlgbrowser.c index 8f04736..194c027 100644 --- a/dlls/comdlg32/filedlgbrowser.c +++ b/dlls/comdlg32/filedlgbrowser.c @@ -843,7 +843,11 @@ static HRESULT WINAPI IShellBrowserImpl_ { FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr); if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) - SetDlgItemTextA(fodInfos->ShellInfos.hwndOwner,IDOK,"&Save"); + { + WCHAR szSave[16]; + LoadStringW(COMDLG32_hInstance, IDS_SAVE_BUTTON, szSave, sizeof(szSave)/sizeof(WCHAR)); + SetDlgItemTextW(fodInfos->ShellInfos.hwndOwner, IDOK, szSave); + } } break; case CDBOSC_SELCHANGE:
1
0
0
0
Alexandre Julliard : Makefile: Avoid trailing slash in find, it breaks tags on MacOS.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: 409b135a0204e1d3f00e0194ca90cb58212a6c41 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=409b135a0204e1d3f00e019…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 3 15:06:43 2006 +0200 Makefile: Avoid trailing slash in find, it breaks tags on MacOS. --- Makefile.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7a6d63b..5f3d768 100644 --- a/Makefile.in +++ b/Makefile.in @@ -131,10 +131,10 @@ # Test rules # Misc rules TAGS etags: - find $(TOPSRCDIR)/ -name '*.[ch]' -print | etags - + find -L $(TOPSRCDIR) -name '*.[ch]' -print | etags - tags ctags: - find $(TOPSRCDIR)/ -name '*.[ch]' -print | ctags --c-types=+px -L - + find -L $(TOPSRCDIR) -name '*.[ch]' -print | ctags --c-types=+px -L - manpages htmlpages sgmlpages: dummy @cd documentation && $(MAKE) $@
1
0
0
0
Alexandre Julliard : ntdll: Added error mapping for ENXIO.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: e57118b2fd86d823315de9f0b47981706c2accd7 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=e57118b2fd86d823315de9f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 3 15:06:41 2006 +0200 ntdll: Added error mapping for ENXIO. --- dlls/ntdll/file.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index c1acdd1..49a9e96 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -358,6 +358,7 @@ NTSTATUS FILE_GetNtStatus(void) #ifdef ENOMEDIUM case ENOMEDIUM: return STATUS_NO_MEDIA_IN_DEVICE; #endif + case ENXIO: return STATUS_NO_SUCH_DEVICE; case ENOTTY: case EOPNOTSUPP:return STATUS_NOT_SUPPORTED; case ECONNRESET:return STATUS_PIPE_DISCONNECTED;
1
0
0
0
Alexandre Julliard : ntdll: Implement FSCTL_DISMOUNT_VOLUME for MacOSX.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: 01dd1ffdc2a8af27e4df1a24f9aec04a65204f42 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=01dd1ffdc2a8af27e4df1a2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 3 14:54:21 2006 +0200 ntdll: Implement FSCTL_DISMOUNT_VOLUME for MacOSX. --- dlls/ntdll/directory.c | 36 +++++++++++++++++++++++++++++++++++- server/fd.c | 12 +++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 60aa5b5..145fc00 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -158,6 +158,17 @@ static inline BOOL is_invalid_dos_char( return strchrW( invalid_chars, ch ) != NULL; } +/* check if the device can be a mounted volume */ +static inline int is_valid_mounted_device( struct stat *st ) +{ +#if defined(linux) || defined(__sun__) + return S_ISBLK( st->st_mode ); +#else + /* disks are char devices on *BSD */ + return S_ISCHR( st->st_mode ); +#endif +} + /*********************************************************************** * get_default_com_device * @@ -565,6 +576,25 @@ #ifdef linux endmntent( f ); } RtlLeaveCriticalSection( &dir_section ); +#elif defined(__APPLE__) + struct statfs *entry; + struct stat st; + int i, size; + + RtlEnterCriticalSection( &dir_section ); + + size = getmntinfo( &entry, MNT_NOWAIT ); + for (i = 0; i < size; i++) + { + if (stat( entry[i].f_mntfromname, &st ) == -1) continue; + if (S_ISBLK(st.st_mode) && st.st_rdev == dev) + { + ret = RtlAllocateHeap( GetProcessHeap(), 0, strlen(entry[i].f_mntfromname) + 1 ); + if (ret) strcpy( ret, entry[i].f_mntfromname ); + break; + } + } + RtlLeaveCriticalSection( &dir_section ); #else static int warned; if (!warned++) FIXME( "unmounting devices not supported on this platform\n" ); @@ -1760,13 +1790,17 @@ NTSTATUS DIR_unmount_device( HANDLE hand struct stat st; char *mount_point = NULL; - if (fstat( unix_fd, &st ) == -1 || !S_ISBLK(st.st_mode)) + if (fstat( unix_fd, &st ) == -1 || !is_valid_mounted_device( &st )) status = STATUS_INVALID_PARAMETER; else { if ((mount_point = get_device_mount_point( st.st_rdev ))) { +#ifdef __APPLE__ + static const char umount[] = "diskutil unmount >/dev/null 2>&1 "; +#else static const char umount[] = "umount >/dev/null 2>&1 "; +#endif char *cmd = RtlAllocateHeap( GetProcessHeap(), 0, strlen(mount_point)+sizeof(umount)); if (cmd) { diff --git a/server/fd.c b/server/fd.c index 5f172a9..e422eea 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1780,6 +1780,16 @@ void no_cancel_async( struct fd *fd ) set_error( STATUS_OBJECT_TYPE_MISMATCH ); } +static inline int is_valid_mounted_device( struct stat *st ) +{ +#if defined(linux) || defined(__sun__) + return S_ISBLK( st->st_mode ); +#else + /* disks are char devices on *BSD */ + return S_ISCHR( st->st_mode ); +#endif +} + /* close all Unix file descriptors on a device to allow unmounting it */ static void unmount_device( struct fd *device_fd ) { @@ -1792,7 +1802,7 @@ static void unmount_device( struct fd *d if (unix_fd == -1) return; - if (fstat( unix_fd, &st ) == -1 || !S_ISBLK( st.st_mode )) + if (fstat( unix_fd, &st ) == -1 || !is_valid_mounted_device( &st )) { set_error( STATUS_INVALID_PARAMETER ); return;
1
0
0
0
Alexandre Julliard : explorer: Added dynamic drive support for MacOSX.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: 6735eb2e0a1c8e3c4f078fb88e1a8ebbcf0111c4 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=6735eb2e0a1c8e3c4f078fb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 3 14:54:16 2006 +0200 explorer: Added dynamic drive support for MacOSX. --- configure | 6 + configure.ac | 1 programs/explorer/Makefile.in | 2 programs/explorer/desktop.c | 1 programs/explorer/device.c | 14 +++ programs/explorer/diskarb.c | 143 ++++++++++++++++++++++++++++++++++ programs/explorer/explorer_private.h | 1 programs/explorer/hal.c | 2 8 files changed, 166 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f0cd81c..c009a21 100755 --- a/configure +++ b/configure @@ -743,6 +743,7 @@ DLLTOOL DLLWRAP COREFOUNDATIONLIB IOKITLIB +DISKARBITRATIONLIB LDEXECFLAGS COREAUDIO CROSSTEST @@ -15359,6 +15360,8 @@ fi IOKITLIB="-framework IOKit -framework CoreFoundation" + DISKARBITRATIONLIB="-framework DiskArbitration -framework CoreFoundation" + LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7f000000" if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes" @@ -24840,6 +24843,7 @@ DLLTOOL!$DLLTOOL$ac_delim DLLWRAP!$DLLWRAP$ac_delim COREFOUNDATIONLIB!$COREFOUNDATIONLIB$ac_delim IOKITLIB!$IOKITLIB$ac_delim +DISKARBITRATIONLIB!$DISKARBITRATIONLIB$ac_delim LDEXECFLAGS!$LDEXECFLAGS$ac_delim COREAUDIO!$COREAUDIO$ac_delim CROSSTEST!$CROSSTEST$ac_delim @@ -24858,7 +24862,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 77; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index a31cd9d..53a3126 100644 --- a/configure.ac +++ b/configure.ac @@ -1005,6 +1005,7 @@ case $host_os in dnl declare needed frameworks AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation") AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation") + AC_SUBST(DISKARBITRATIONLIB,"-framework DiskArbitration -framework CoreFoundation") AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7f000000"]) if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes" then diff --git a/programs/explorer/Makefile.in b/programs/explorer/Makefile.in index d2630f4..3ee51f8 100644 --- a/programs/explorer/Makefile.in +++ b/programs/explorer/Makefile.in @@ -7,10 +7,12 @@ APPMODE = -mwindows IMPORTS = user32 gdi32 advapi32 kernel32 ntdll DELAYIMPORTS = comctl32 EXTRADEFS = @HALINCL@ +EXTRALIBS = @DISKARBITRATIONLIB@ C_SRCS = \ desktop.c \ device.c \ + diskarb.c \ explorer.c \ hal.c \ systray.c diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index bbbde03..095f95b 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -166,6 +166,7 @@ void manage_desktop( char *arg ) SetWindowTextW( hwnd, desktop_nameW ); SystemParametersInfoA( SPI_SETDESKPATTERN, -1, NULL, FALSE ); SetDeskWallPaper( (LPSTR)-1 ); + initialize_diskarbitration(); initialize_hal(); initialize_systray(); } diff --git a/programs/explorer/device.c b/programs/explorer/device.c index e3309fa..922f4d0 100644 --- a/programs/explorer/device.c +++ b/programs/explorer/device.c @@ -76,6 +76,16 @@ static void send_notify( int drive, int SMTO_ABORTIFHUNG, 0, &result ); } +static inline int is_valid_device( struct stat *st ) +{ +#if defined(linux) || defined(__sun__) + return S_ISBLK( st->st_mode ); +#else + /* disks are char devices on *BSD */ + return S_ISCHR( st->st_mode ); +#endif +} + /* find or create a DOS drive for the corresponding device */ static int add_drive( const char *device, const char *type ) { @@ -84,7 +94,7 @@ static int add_drive( const char *device struct stat dev_st, drive_st; int drive, first, last, avail = 0; - if (stat( device, &dev_st ) == -1 || !S_ISBLK( dev_st.st_mode )) return -1; + if (stat( device, &dev_st ) == -1 || !is_valid_device( &dev_st )) return -1; if (!(path = get_dosdevices_path())) return -1; p = path + strlen(path) - 3; @@ -123,7 +133,7 @@ static int add_drive( const char *device else { in_use[drive] = 1; - if (!S_ISBLK( drive_st.st_mode )) continue; + if (!is_valid_device( &drive_st )) continue; if (dev_st.st_rdev == drive_st.st_rdev) goto done; } } diff --git a/programs/explorer/diskarb.c b/programs/explorer/diskarb.c new file mode 100644 index 0000000..b3b653d --- /dev/null +++ b/programs/explorer/diskarb.c @@ -0,0 +1,143 @@ +/* + * Devices support using the MacOS Disk Arbitration library. + * + * Copyright 2006 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/port.h" + +#include <assert.h> +#include <errno.h> +#include <stdarg.h> +#include <stdio.h> +#include <sys/time.h> + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winuser.h" + +#include "wine/debug.h" +#include "explorer_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(explorer); + +#ifdef __APPLE__ + +#include <DiskArbitration/DiskArbitration.h> + +static void appeared_callback( DADiskRef disk, void *context ) +{ + CFDictionaryRef dict = DADiskCopyDescription( disk ); + const void *ref; + char device[64]; + char mount_point[PATH_MAX]; + const char *type = NULL; + + if (!dict) return; + + /* ignore non-removable devices */ + if (!(ref = CFDictionaryGetValue( dict, CFSTR("DAMediaRemovable") )) || + !CFBooleanGetValue( ref )) return; + + /* get device name */ + if (!(ref = CFDictionaryGetValue( dict, CFSTR("DAMediaBSDName") ))) return; + strcpy( device, "/dev/r" ); + CFStringGetCString( ref, device + 6, sizeof(device) - 6, kCFStringEncodingASCII ); + + if ((ref = CFDictionaryGetValue( dict, CFSTR("DAVolumePath") ))) + CFURLGetFileSystemRepresentation( ref, true, (UInt8 *)mount_point, sizeof(mount_point) ); + else + mount_point[0] = 0; + + if ((ref = CFDictionaryGetValue( dict, CFSTR("DAVolumeKind") ))) + { + if (!CFStringCompare( ref, CFSTR("cd9660"), 0 ) || + !CFStringCompare( ref, CFSTR("udf"), 0 )) + type = "cdrom"; + } + + WINE_TRACE( "got mount notification for '%s' on '%s'\n", device, mount_point ); + + add_dos_device( device, device, mount_point, type ); + CFRelease( dict ); +} + +static void changed_callback( DADiskRef disk, CFArrayRef keys, void *context ) +{ + appeared_callback( disk, context ); +} + +static void disappeared_callback( DADiskRef disk, void *context ) +{ + CFDictionaryRef dict = DADiskCopyDescription( disk ); + const void *ref; + char device[100]; + + if (!dict) return; + + /* ignore non-removable devices */ + if (!(ref = CFDictionaryGetValue( dict, CFSTR("DAMediaRemovable") )) || + !CFBooleanGetValue( ref )) return; + + /* get device name */ + if (!(ref = CFDictionaryGetValue( dict, CFSTR("DAMediaBSDName") ))) return; + strcpy( device, "/dev/r" ); + CFStringGetCString( ref, device + 6, sizeof(device) - 6, kCFStringEncodingASCII ); + + WINE_TRACE( "got unmount notification for '%s'\n", device ); + + remove_dos_device( device ); + CFRelease( dict ); +} + +static DWORD WINAPI runloop_thread( void *arg ) +{ + DASessionRef session = DASessionCreate( NULL ); + + if (!session) return 1; + + DASessionScheduleWithRunLoop( session, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode ); + DARegisterDiskAppearedCallback( session, kDADiskDescriptionMatchVolumeMountable, + appeared_callback, NULL ); + DARegisterDiskDisappearedCallback( session, kDADiskDescriptionMatchVolumeMountable, + disappeared_callback, NULL ); + DARegisterDiskDescriptionChangedCallback( session, kDADiskDescriptionMatchVolumeMountable, + kDADiskDescriptionWatchVolumePath, changed_callback, NULL ); + CFRunLoopRun(); + DASessionUnscheduleFromRunLoop( session, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode ); + CFRelease( session ); + return 0; +} + +void initialize_diskarbitration(void) +{ + HANDLE handle; + + if (!(handle = CreateThread( NULL, 0, runloop_thread, NULL, 0, NULL ))) return; + CloseHandle( handle ); +} + +#else /* __APPLE__ */ + +void initialize_diskarbitration(void) +{ + WINE_TRACE( "Skipping on non-Apple platform\n" ); +} + +#endif /* __APPLE__ */ diff --git a/programs/explorer/explorer_private.h b/programs/explorer/explorer_private.h index 806dd4c..59667eb 100644 --- a/programs/explorer/explorer_private.h +++ b/programs/explorer/explorer_private.h @@ -26,6 +26,7 @@ extern BOOL add_dos_device( const char * extern BOOL remove_dos_device( const char *udi ); extern void manage_desktop( char *arg ); +extern void initialize_diskarbitration(void); extern void initialize_hal(void); extern void initialize_systray(void); diff --git a/programs/explorer/hal.c b/programs/explorer/hal.c index dc7f66f..7cd1a1d 100644 --- a/programs/explorer/hal.c +++ b/programs/explorer/hal.c @@ -240,7 +240,7 @@ #else /* HAVE_LIBHAL */ void initialize_hal(void) { - WINE_WARN( "HAL support not compiled in\n" ); + WINE_TRACE( "Skipping, HAL support not compiled in\n" ); } #endif /* HAVE_LIBHAL */
1
0
0
0
Alexandre Julliard : explorer: Avoid repeated notifications on device removal.
by Alexandre Julliard
03 Oct '06
03 Oct '06
Module: wine Branch: master Commit: ab6fa810d7f36dc345e8946272043f85c34bf1d2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ab6fa810d7f36dc345e8946…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 3 12:40:39 2006 +0200 explorer: Avoid repeated notifications on device removal. --- programs/explorer/device.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/programs/explorer/device.c b/programs/explorer/device.c index 0b86b43..e3309fa 100644 --- a/programs/explorer/device.c +++ b/programs/explorer/device.c @@ -143,13 +143,14 @@ done: return drive; } -static void set_mount_point( struct dos_drive *drive, const char *mount_point ) +static BOOL set_mount_point( struct dos_drive *drive, const char *mount_point ) { char *path, *p; struct stat path_st, mnt_st; + BOOL modified = FALSE; - if (drive->drive == -1) return; - if (!(path = get_dosdevices_path())) return; + if (drive->drive == -1) return FALSE; + if (!(path = get_dosdevices_path())) return FALSE; p = path + strlen(path) - 3; *p = 'a' + drive->drive; p[2] = 0; @@ -162,11 +163,16 @@ static void set_mount_point( struct dos_ { unlink( path ); symlink( mount_point, path ); + modified = TRUE; } } - else unlink( path ); + else + { + if (unlink( path ) != -1) modified = TRUE; + } HeapFree( GetProcessHeap(), 0, path ); + return modified; } BOOL add_dos_device( const char *udi, const char *device, @@ -227,7 +233,7 @@ BOOL remove_dos_device( const char *udi if (drive->drive != -1) { - set_mount_point( drive, "" ); + BOOL modified = set_mount_point( drive, "" ); /* clear the registry key too */ if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Drives", &hkey )) @@ -238,7 +244,7 @@ BOOL remove_dos_device( const char *udi RegCloseKey( hkey ); } - send_notify( drive->drive, DBT_DEVICEREMOVECOMPLETE ); + if (modified) send_notify( drive->drive, DBT_DEVICEREMOVECOMPLETE ); } list_remove( &drive->entry );
1
0
0
0
← Newer
1
...
92
93
94
95
96
97
98
...
104
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Results per page:
10
25
50
100
200