ReactOS.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
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
List overview
Download
Ros-diffs
January 2005
----- 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
ros-diffs@reactos.org
28 participants
703 discussions
Start a n
N
ew thread
[ion] 13295: Remove debug output from user mode exceptions. Reported by hbirr.
by ion@svn.reactos.com
Remove debug output from user mode exceptions. Reported by hbirr. Modified: trunk/reactos/config Modified: trunk/reactos/lib/rtl/i386/exception.c _____ Modified: trunk/reactos/config --- trunk/reactos/config 2005-01-25 23:36:16 UTC (rev 13294) +++ trunk/reactos/config 2005-01-25 23:36:23 UTC (rev 13295) @@ -30,7 +30,7 @@ # # Whether to compile with optimizations # -OPTIMIZED := 0 +OPTIMIZED := 1 # # Whether to compile a multiprocessor or single processor version @@ -45,7 +45,7 @@ # # whether to use a 3GB User, 1GB Kernel memory map # -3GB := 1 +3GB := 0 # # Which version of NDIS do we support up to? _____ Modified: trunk/reactos/lib/rtl/i386/exception.c --- trunk/reactos/lib/rtl/i386/exception.c 2005-01-25 23:36:16 UTC (rev 13294) +++ trunk/reactos/lib/rtl/i386/exception.c 2005-01-25 23:36:23 UTC (rev 13295) @@ -13,7 +13,7 @@ #include <windows.h> #include <string.h> -//#define NDEBUG +#define NDEBUG #include <debug.h> /* FUNCTIONS ***************************************************************/
19 years, 11 months
1
0
0
0
[sedwards] 13294: removing this to reimport it
by sedwards@svn.reactos.com
removing this to reimport it Deleted: trunk/reactos/lib/setupapi/
19 years, 11 months
1
0
0
0
[sedwards] 13293: Imported vendor drop of setupapi.
by sedwards@svn.reactos.com
Imported vendor drop of setupapi. Added: trunk/reactos/lib/setupapi/current/ _____ Copied: trunk/reactos/lib/setupapi/current (from rev 13292, vendor/wine/dlls/setupapi/current)
19 years, 11 months
1
0
0
0
[sedwards] 13292: Taged this import as being from CVS and not release.
by sedwards@svn.reactos.com
Taged this import as being from CVS and not release. Added: vendor/wine/dlls/setupapi/WineCVS-20050125/ _____ Copied: vendor/wine/dlls/setupapi/WineCVS-20050125 (from rev 13291, vendor/wine/dlls/setupapi/current)
19 years, 11 months
1
0
0
0
[sedwards] 13291: Import current Winehq setupapi dll from cvs
by sedwards@svn.reactos.com
Import current Winehq setupapi dll from cvs Added: vendor/wine/dlls/setupapi/ Added: vendor/wine/dlls/setupapi/current/ Added: vendor/wine/dlls/setupapi/current/Cs.rc Added: vendor/wine/dlls/setupapi/current/De.rc Added: vendor/wine/dlls/setupapi/current/En.rc Added: vendor/wine/dlls/setupapi/current/Es.rc Added: vendor/wine/dlls/setupapi/current/Fr.rc Added: vendor/wine/dlls/setupapi/current/It.rc Added: vendor/wine/dlls/setupapi/current/Ja.rc Added: vendor/wine/dlls/setupapi/current/Makefile Added: vendor/wine/dlls/setupapi/current/Makefile.in Added: vendor/wine/dlls/setupapi/current/Nl.rc Added: vendor/wine/dlls/setupapi/current/Pt.rc Added: vendor/wine/dlls/setupapi/current/Ru.rc Added: vendor/wine/dlls/setupapi/current/devinst.c Added: vendor/wine/dlls/setupapi/current/devinst16.c Added: vendor/wine/dlls/setupapi/current/dirid.c Added: vendor/wine/dlls/setupapi/current/diskspace.c Added: vendor/wine/dlls/setupapi/current/infparse.c Added: vendor/wine/dlls/setupapi/current/install.c Added: vendor/wine/dlls/setupapi/current/misc.c Added: vendor/wine/dlls/setupapi/current/parser.c Added: vendor/wine/dlls/setupapi/current/queue.c Added: vendor/wine/dlls/setupapi/current/setupapi.rc Added: vendor/wine/dlls/setupapi/current/setupapi.spec Added: vendor/wine/dlls/setupapi/current/setupapi_private.h Added: vendor/wine/dlls/setupapi/current/setupcab.c Added: vendor/wine/dlls/setupapi/current/setupx.spec Added: vendor/wine/dlls/setupapi/current/setupx16.h Added: vendor/wine/dlls/setupapi/current/setupx_main.c Added: vendor/wine/dlls/setupapi/current/stubs.c Added: vendor/wine/dlls/setupapi/current/virtcopy.c _____ Added: vendor/wine/dlls/setupapi/current/Cs.rc --- vendor/wine/dlls/setupapi/current/Cs.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Cs.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,35 @@ +/* + * Czech resources for SETUPAPI + * + * Copyright 2001 Andreas Mohr + * Copyright 2004 David Kredba + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_CZECH, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Kopíruji soubory..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Storno", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Zdroj:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Cíl:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/De.rc --- vendor/wine/dlls/setupapi/current/De.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/De.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * German resources for SETUPAPI + * + * Copyright 2004 Henning Gerhardt + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Dateien kopieren..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Abbrechen", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Quelle:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Ziel:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/En.rc --- vendor/wine/dlls/setupapi/current/En.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/En.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * English resources for SETUPAPI + * + * Copyright 2001 Andreas Mohr + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Copying Files..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Cancel", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Source:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Destination:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/Es.rc --- vendor/wine/dlls/setupapi/current/Es.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Es.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * Spanish resources for SETUPAPI + * + * Copyright 2003 José Manuel Ferrer Ortiz + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Copiando archivos..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Cancelar", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Origen:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Destino:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/Fr.rc --- vendor/wine/dlls/setupapi/current/Fr.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Fr.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,35 @@ +/* + * French resources for SETUPAPI + * + * Copyright 2001 Andreas Mohr + * Copyright 2003 Vincent Béron + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Copie de fichiers..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Annuler", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Source:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Destination:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/It.rc --- vendor/wine/dlls/setupapi/current/It.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/It.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,35 @@ +/* + * Italian resources for SETUPAPI + * + * Copyright 2001 Andreas Mohr + * Copyright 2003 Ivan Leo Puoti + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Copia dei file in corso..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Anulla", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Origine:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Destinazione:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/Ja.rc --- vendor/wine/dlls/setupapi/current/Ja.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Ja.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * Japanese resources for SETUPAPI + * + * Copyright 2004 Hajime Segawa + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "ftf@fCf<,ðfRfs[,µ,Ä,¢,Ü,·..." +FONT 9, "MS UI Gothic" +BEGIN + PUSHBUTTON "fLfff"fZf<", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "fRfs[O³:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "fRfs[æ:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/Makefile --- vendor/wine/dlls/setupapi/current/Makefile 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Makefile 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,415 @@ +EXTRADEFS = -D_SETUPAPI_ +TOPSRCDIR = ../.. +TOPOBJDIR = ../.. +SRCDIR = . + +MODULE = setupapi.dll +IMPORTS = user32 version advapi32 rpcrt4 kernel32 ntdll +DELAYIMPORTS = shell32 +EXTRALIBS = $(LIBUNICODE) + +C_SRCS = \ + devinst.c \ + dirid.c \ + diskspace.c \ + install.c \ + misc.c \ + parser.c \ + queue.c \ + setupcab.c \ + stubs.c + +C_SRCS16 = \ + devinst16.c \ + infparse.c \ + setupx_main.c \ + virtcopy.c + +SPEC_SRCS16 = setupx.spec + +RC_SRCS= setupapi.rc + + +# Global rules for building dlls -*-Makefile-*- +# +# Each individual makefile should define the following variables: +# MODULE : name of the main module being built +# EXTRALIBS : extra libraries to link in (optional) +# SPEC_SRCS16 : interface definition files for 16-bit dlls (optional) +# SUBSYSTEM : (optional) subsystem (for native dlls) +# +# plus all variables required by the global Make.rules.in +# + +DLLDEFS = +DLLFLAGS = -D_REENTRANT +DLLEXT = +DEFS = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS) +MAINSPEC = $(MODULE:%.dll=%).spec +SPEC_DEF = $(MAINSPEC).def +WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) +ALL_OBJS = $(OBJS) $(MODULE).dbg.o +ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) +IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) + +all: $(MODULE)$(DLLEXT) $(SUBDIRS) + + +# Global rules shared by all makefiles -*-Makefile-*- +# +# Each individual makefile must define the following variables: +# TOPSRCDIR : top-level source directory +# TOPOBJDIR : top-level object directory +# SRCDIR : source directory for this module +# MODULE : name of the module being built +# +# Each individual makefile may define the following additional variables: +# C_SRCS : C sources for the module +# C_SRCS16 : 16-bit C sources for the module +# RC_SRCS : resource source files +# EXTRA_SRCS : extra source files for make depend +# EXTRA_OBJS : extra object files +# IMPORTS : dlls to import +# DELAYIMPORTS : dlls to import in delayed mode +# SUBDIRS : subdirectories that contain a Makefile +# EXTRASUBDIRS : subdirectories that do not contain a Makefile +# INSTALLSUBDIRS : subdirectories to run make install/uninstall into + +# First some useful definitions + +SHELL = /bin/sh +CC = mingw32-gcc +CFLAGS = -g -O2 +CPPFLAGS = +LIBS = +BISON = bison +YACC = $(BISON) -y +LEX = flex +LEXLIB = +EXEEXT = .exe +OBJEXT = o +LIBEXT = dll +DLLEXT = +IMPLIBEXT = a +LDSHARED = +DLLTOOL = mingw32-dlltool +DLLWRAP = mingw32-dllwrap +AR = mingw32-ar rc +RANLIB = mingw32-ranlib +STRIP = mingw32-strip +WINDRES = mingw32-windres +LN = ln +LN_S = ln -s +TOOLSDIR = /usr/src/wine-tools/ +AS = mingw32-as +LD = mingw32-ld +LDFLAGS = +RM = rm -f +MV = mv +LINT = +LINTFLAGS = +FONTFORGE = fontforge +INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) +EXTRACFLAGS = -Wall -pipe -fno-strength-reduce -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith +ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) +ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) +IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) +MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 +WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check +WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper +C2MAN = $(TOPSRCDIR)/tools/c2man.pl +RUNTEST = $(TOPSRCDIR)/tools/runtest +WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild +MAKEDEP = $(TOOLSDIR)/tools/makedep +WRC = $(TOOLSDIR)/tools/wrc/wrc +BIN2RES = $(TOOLSDIR)/tools/bin2res +WMC = $(TOOLSDIR)/tools/wmc/wmc +WIDL = $(TOOLSDIR)/tools/widl/widl +WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc +SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt +FNT2FON = $(TOOLSDIR)/tools/fnt2fon +RC = $(WRC) +RC16 = $(WRC) +RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS) +RC16FLAGS = -O res16 $(RCFLAGS) +LDPATH = LD_LIBRARY_PATH="$(TOOLSDIR)/libs/unicode:$$LD_LIBRARY_PATH" +DLLDIR = $(TOPOBJDIR)/dlls +LIBDIR = $(TOPOBJDIR)/libs +LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port +LIBUNICODE = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode +LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine + + + +# Installation infos + +INSTALL = /usr/bin/ginstall -c $(INSTALL_FLAGS) +INSTALL_PROGRAM = ${INSTALL} $(INSTALL_PROGRAM_FLAGS) +INSTALL_SCRIPT = ${INSTALL} $(INSTALL_SCRIPT_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 $(INSTALL_DATA_FLAGS) +prefix = /usr/local +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin +libdir = ${exec_prefix}/lib +datadir = ${prefix}/share +infodir = ${prefix}/info +mandir = ${prefix}/man +sysconfdir = ${prefix}/etc +includedir = ${prefix}/include/wine +dlldir = ${exec_prefix}/lib/wine +prog_manext = 1 +api_manext = 3w +conf_manext = 5 +CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ + *.flc *.spec.c *.spec.def *.dbg.c *.tab.c *.tab.h lex.yy.c core + +OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS) + +RCOBJS = $(RC_SRCS:.rc=.res.o) +LINTS = $(C_SRCS:.c=.ln) + +# Implicit rules + +.SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.c .spec.def .idl .h .ok .sfd .ttf + +.c.o: + $(CC) -c $(ALLCFLAGS) -o $@ $< + +.s.o: + $(AS) -o $@ $< + +.mc.mc.rc: + $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< + +.rc.res: + $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $< + +.res.res.o: + $(WINDRES) -i $< -o $@ + +.spec.spec.c: + $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --dll $< + +.spec.spec.def: + $(WINEBUILD) -w $(DEFS) -o $@ --def $< + +.idl.h: + $(WIDL) $(IDLFLAGS) -h -H $@ $< + +.c.ln: + $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) + +.c.ok: + $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ + +.sfd.ttf: + $(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< + +# 'all' target first in case the enclosing Makefile didn't define any target + +all: Makefile + +filter: + @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all + +.PHONY: all filter + +# Rules for resources + +$(RC_BINARIES): $(BIN2RES) $(RC_BINSRC) + $(BIN2RES) -f -o $@ $(SRCDIR)/$(RC_BINSRC) + +$(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_BINARIES) + +# Rule for main module debug channels + +$(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD) + $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) + +# Rules for makefile + +Makefile: Makefile.in $(TOPSRCDIR)/configure + @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure + @exit 1 + +# Rule for linting + +$(MODULE).ln : $(LINTS) + if test "$(LINTS)" ; \ + then \ + $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ + $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ + else \ + $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ + fi + +lint:: $(MODULE).ln + +# Rules for Windows API checking + +winapi_check:: dummy + $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . + +.PHONY: winapi_check + +# Rules for dependencies + +$(SUBDIRS:%=%/__depend__): dummy + cd `dirname $@` && $(MAKE) depend + +depend: $(IDL_SRCS:.idl=.h) $(SUBDIRS:%=%/__depend__) + $(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS) + +.PHONY: depend $(SUBDIRS:%=%/__depend__) + +# Rules for cleaning + +$(SUBDIRS:%=%/__clean__): dummy + cd `dirname $@` && $(MAKE) clean + +$(SUBDIRS:%=%/__testclean__): dummy + cd `dirname $@` && $(MAKE) testclean + +$(EXTRASUBDIRS:%=%/__clean__): dummy + -cd `dirname $@` && $(RM) $(CLEAN_FILES) + +testclean:: $(SUBDIRS:%=%/__testclean__) + +clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) + $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(IDL_SRCS:.idl=.h) $(PROGRAMS) $(RC_BINARIES) + +.PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__) + +# Rules for installing + +$(SUBDIRS:%=%/__install__): dummy + cd `dirname $@` && $(MAKE) install + +$(SUBDIRS:%=%/__install-lib__): dummy + cd `dirname $@` && $(MAKE) install-lib + +$(SUBDIRS:%=%/__install-dev__): dummy + cd `dirname $@` && $(MAKE) install-dev + +$(SUBDIRS:%=%/__uninstall__): dummy + cd `dirname $@` && $(MAKE) uninstall + +install:: $(INSTALLSUBDIRS:%=%/__install__) + +uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) + +.PHONY: install install-lib install-dev uninstall \ + $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \ + $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__) + +# Rules for checking that no imports are missing + +$(SUBDIRS:%=%/__checklink__): dummy + @cd `dirname $@` && $(MAKE) checklink + +.PHONY: checklink $(SUBDIRS:%=%/__checklink__) + +# Rules for testing + +$(SUBDIRS:%=%/__test__): dummy + @cd `dirname $@` && $(MAKE) test + +$(SUBDIRS:%=%/__crosstest__): dummy + @cd `dirname $@` && $(MAKE) crosstest + +.PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__) + +# Misc. rules + +$(MC_SRCS:.mc=.mc.rc): $(WMC) + +$(IDL_SRCS:.idl=.h): $(WIDL) + +$(SUBDIRS): dummy + @cd $@ && $(MAKE) + +dummy: + +.PHONY: dummy $(SUBDIRS) + +# End of global rules + +# Rules for .so files + +$(MODULE).so: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) Makefile.in + $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(RC_SRCS:.rc=.res) $(SUBSYSTEM:%=-Wb,--subsystem,%) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(IMPORTS:%=-l%) $(ALL_LIBS) + +# Rules for .dll files + +$(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) $(IMPORTLIBS) Makefile.in + $(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS) + +$(SPEC_DEF): $(WINEBUILD) + +# Rules for checking that no imports are missing + +.PHONY: checklink16 $(WIN16_FILES:%=__checklink16__%) + +$(WIN16_FILES:%=__checklink16__%): checklink16 + +checklink16:: $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o dummy + $(CC) -o checklink -Wl,-rpath,$(TOPOBJDIR)/libs $(TOPSRCDIR)/dlls/checklink.c $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(ALL_LIBS) -lm && $(RM) checklink $(MAINSPEC).c $(MAINSPEC).o + +checklink:: $(WIN16_FILES:%=__checklink16__%) + +# Rules for testing + +check test:: $(SUBDIRS:%=%/__test__) + +crosstest:: $(SUBDIRS:%=%/__crosstest__) + +# Rule to explicitly generate the .spec.c for debugging + +$(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) $(WINEBUILD) + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --dll $(SRCDIR)/$(MAINSPEC) $(SUBSYSTEM:%=--subsystem %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) + +# Rules for auto documentation + +man: $(C_SRCS) + $(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) + +doc-html: $(C_SRCS) + $(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPSRCDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) + +doc-sgml: $(C_SRCS) + $(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPSRCDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) + +.PHONY: man doc-html doc-sgml + +# Rules for installation + +EXE_SPECS16 = $(SPEC_SRCS16:.exe.spec=.exe) +DRV_SPECS16 = $(EXE_SPECS16:.drv.spec=.drv) +ALL_SPECS16 = $(DRV_SPECS16:.spec=.dll) + +WIN16_INSTALL = $(ALL_SPECS16:%=_install_/%) + +.PHONY: install_lib $(ALL_SPECS16:%=_install_/%) $(ALL_SPECS16:%=_uninstall_/%) + +$(ALL_SPECS16:%=_install_/%): install_lib + cd $(dlldir) && $(RM) `basename $@`$(DLLEXT) && $(LN_S) $(MODULE)$(DLLEXT) `basename $@`$(DLLEXT) + +$(ALL_SPECS16:%=_uninstall_/%): dummy + $(RM) $(dlldir)/`basename $@`$(DLLEXT) + +install_lib: $(MODULE)$(DLLEXT) + $(MKINSTALLDIRS) $(dlldir) + $(INSTALL_PROGRAM) $(MODULE)$(DLLEXT) $(dlldir)/$(MODULE)$(DLLEXT) + +install:: install_lib + +uninstall:: $(ALL_SPECS16:%=_uninstall_/%) + $(RM) $(dlldir)/$(MODULE)$(DLLEXT) + +# Misc. rules + +$(SPEC_SRCS16:.spec=.spec.c): $(WINEBUILD) + +# End of global dll rules + +### Dependencies: _____ Added: vendor/wine/dlls/setupapi/current/Makefile.in --- vendor/wine/dlls/setupapi/current/Makefile.in 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Makefile.in 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +EXTRADEFS = -D_SETUPAPI_ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = setupapi.dll +IMPORTS = user32 version advapi32 rpcrt4 kernel32 ntdll +DELAYIMPORTS = shell32 +EXTRALIBS = $(LIBUNICODE) + +C_SRCS = \ + devinst.c \ + dirid.c \ + diskspace.c \ + install.c \ + misc.c \ + parser.c \ + queue.c \ + setupcab.c \ + stubs.c + +C_SRCS16 = \ + devinst16.c \ + infparse.c \ + setupx_main.c \ + virtcopy.c + +SPEC_SRCS16 = setupx.spec + +RC_SRCS= setupapi.rc + +@MAKE_DLL_RULES@ + +### Dependencies: _____ Added: vendor/wine/dlls/setupapi/current/Nl.rc --- vendor/wine/dlls/setupapi/current/Nl.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Nl.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * setupapi (Dutch resources) + * + * Copyright 2003 Hans Leidekker + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Bestanden worden gekopiëerd..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Annuleren", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Bron:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Bestemming:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/Pt.rc --- vendor/wine/dlls/setupapi/current/Pt.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Pt.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * Portuguese resources for SETUPAPI + * + * Copyright 2003 Marcelo Duarte + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Copiando arquivos..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Cancelar", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Origem:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Destino:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/Ru.rc --- vendor/wine/dlls/setupapi/current/Ru.rc 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/Ru.rc 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,34 @@ +/* + * SETUPAPI (Russian resources) + * + * Copyright 2003 Igor Stepin + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 +STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Êîïèðîâàíèå ôàéëîâ..." +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Îòìåíà", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Îòêóäà:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Êóäà:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END _____ Added: vendor/wine/dlls/setupapi/current/devinst.c --- vendor/wine/dlls/setupapi/current/devinst.c 2005-01-25 22:58:47 UTC (rev 13290) +++ vendor/wine/dlls/setupapi/current/devinst.c 2005-01-25 23:19:08 UTC (rev 13291) @@ -0,0 +1,1207 @@ +/* + * SetupAPI device installer + * + * Copyright 2000 Andreas Mohr for CodeWeavers + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winnt.h" +#include "winreg.h" +#include "winternl.h" +#include "wingdi.h" +#include "winuser.h" +#include "winnls.h" +#include "setupapi.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +#include "rpc.h" +#include "rpcdce.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(setupapi); + +/* Unicode constants */ +static const WCHAR ClassGUID[] = {'C','l','a','s','s','G','U','I','D',0}; +static const WCHAR Class[] = {'C','l','a','s','s',0}; +static const WCHAR ClassInstall32[] = {'C','l','a','s','s','I','n','s','t','a','l','l','3','2',0}; +static const WCHAR NoDisplayClass[] = {'N','o','D','i','s','p','l','a','y','C','l','a','s','s',0}; +static const WCHAR NoInstallClass[] = {'N','o','I','s','t','a','l','l','C','l','a','s','s',0}; +static const WCHAR NoUseClass[] = {'N','o','U','s','e','C','l','a','s','s',0}; +static const WCHAR NtExtension[] = {'.','N','T',0}; +static const WCHAR NtPlatformExtension[] = {'.','N','T','x','8','6',0}; +static const WCHAR Version[] = {'V','e','r','s','i','o','n',0}; +static const WCHAR WinExtension[] = {'.','W','i','n',0}; + +/* Registry key and value names */ +static const WCHAR ControlClass[] = {'S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\' , + 'C','o','n','t','r','o','l','\\', + 'C','l','a','s','s',0}; + +static const WCHAR DeviceClasses[] = {'S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\' , + 'C','o','n','t','r','o','l','\\', + 'D','e','v','i','c','e','C','l','a','s','s','e','s',0}; + +/********************************************************************** * + * SetupDiBuildClassInfoList (SETUPAPI.@) + */ +BOOL WINAPI SetupDiBuildClassInfoList( + DWORD Flags, + LPGUID ClassGuidList, + DWORD ClassGuidListSize, + PDWORD RequiredSize) +{ + TRACE("\n"); + return SetupDiBuildClassInfoListExW(Flags, ClassGuidList, + ClassGuidListSize, RequiredSize, + NULL, NULL); +} + +/********************************************************************** * + * SetupDiBuildClassInfoListExA (SETUPAPI.@) + */ +BOOL WINAPI SetupDiBuildClassInfoListExA( + DWORD Flags, + LPGUID ClassGuidList, + DWORD ClassGuidListSize, + PDWORD RequiredSize, + LPCSTR MachineName, + PVOID Reserved) +{ + FIXME("\n"); + return FALSE; +} + +/********************************************************************** * + * SetupDiBuildClassInfoListExW (SETUPAPI.@) + */ +BOOL WINAPI SetupDiBuildClassInfoListExW( + DWORD Flags, + LPGUID ClassGuidList, + DWORD ClassGuidListSize, + PDWORD RequiredSize, + LPCWSTR MachineName, + PVOID Reserved) +{ + WCHAR szKeyName[40]; + HKEY hClassesKey; + HKEY hClassKey; + DWORD dwLength; + DWORD dwIndex; + LONG lError; + DWORD dwGuidListIndex = 0; + + TRACE("\n"); + + if (RequiredSize != NULL) + *RequiredSize = 0; + + hClassesKey = SetupDiOpenClassRegKeyExW(NULL, + KEY_ALL_ACCESS, + DIOCR_INSTALLER, + MachineName, + Reserved); + if (hClassesKey == INVALID_HANDLE_VALUE) + { + return FALSE; + } + + for (dwIndex = 0; ; dwIndex++) + { + dwLength = 40; + lError = RegEnumKeyExW(hClassesKey, + dwIndex, + szKeyName, + &dwLength, + NULL, + NULL, + NULL, + NULL); + TRACE("RegEnumKeyExW() returns %ld\n", lError); + if (lError == ERROR_SUCCESS || lError == ERROR_MORE_DATA) [truncated at 1000 lines; 10057 more skipped]
19 years, 11 months
1
0
0
0
[gvg] 13290: Replace wcschr. Fixes bug #488.
by gvg@svn.reactos.com
Replace wcschr. Fixes bug #488. Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c _____ Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c --- trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-01-25 22:51:51 UTC (rev 13289) +++ trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-01-25 22:58:47 UTC (rev 13290) @@ -63,8 +63,8 @@ PKEY_OBJECT KeyObject; NTSTATUS Status; PVOID Object; - PWSTR End; PWSTR Start; + unsigned i; DPRINT("NtCreateKey (Name %wZ KeyHandle %x Root %x)\n", ObjectAttributes->ObjectName, @@ -83,7 +83,7 @@ DPRINT("RemainingPath %wZ\n", &RemainingPath); - if ((RemainingPath.Buffer == NULL) || (RemainingPath.Buffer[0] == 0)) + if (RemainingPath.Length == 0) { /* Fail if the key has been deleted */ if (((PKEY_OBJECT) Object)->Flags & KO_MARKED_FOR_DELETE) @@ -110,18 +110,20 @@ } /* If RemainingPath contains \ we must return error - because NtCreateKey don't create trees */ + because NtCreateKey doesn't create trees */ Start = RemainingPath.Buffer; if (*Start == L'\\') Start++; - End = wcschr(Start, L'\\'); - if (End != NULL) + for (i = 1; i < RemainingPath.Length / sizeof(WCHAR); i++) { - ObDereferenceObject(Object); - DPRINT1("NtCreateKey() can't create trees! (found \'\\\' in remaining path: \"%wZ\"!)\n", &RemainingPath); - RtlFreeUnicodeString(&RemainingPath); - return STATUS_OBJECT_NAME_NOT_FOUND; + if (L'\\' == RemainingPath.Buffer[i]) + { + ObDereferenceObject(Object); + DPRINT1("NtCreateKey() doesn't create trees! (found \'\\\' in remaining path: \"%wZ\"!)\n", &RemainingPath); + RtlFreeUnicodeString(&RemainingPath); + return STATUS_OBJECT_NAME_NOT_FOUND; + } } DPRINT("RemainingPath %S ParentObject %x\n", RemainingPath.Buffer, Object);
19 years, 11 months
1
0
0
0
[hbirr] 13289: - Removed slab.c, because this functions are not used.
by hbirr@svn.reactos.com
- Removed slab.c, because this functions are not used. Deleted: trunk/reactos/ntoskrnl/mm/slab.c _____ Deleted: trunk/reactos/ntoskrnl/mm/slab.c --- trunk/reactos/ntoskrnl/mm/slab.c 2005-01-25 22:50:47 UTC (rev 13288) +++ trunk/reactos/ntoskrnl/mm/slab.c 2005-01-25 22:51:51 UTC (rev 13289) @@ -1,324 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/slab.c - * PURPOSE: Slab allocator. - * PROGRAMMER: David Welch (welch(a)cwcom.net) - * UPDATE HISTORY: - * Created 27/12/01 - */ - -/* INCLUDES *****************************************************************/ - -#include <ntoskrnl.h> -#define NDEBUG -#include <internal/debug.h> - -/* TYPES ********************************************************************/ - -typedef VOID (*SLAB_CACHE_CONSTRUCTOR)(VOID*, ULONG); -typedef VOID (*SLAB_CACHE_DESTRUCTOR)(VOID*, ULONG); - -struct _SLAB_CACHE_PAGE; - -typedef struct _SLAB_CACHE -{ - SLAB_CACHE_CONSTRUCTOR Constructor; - SLAB_CACHE_DESTRUCTOR Destructor; - ULONG BaseSize; - ULONG ObjectSize; - ULONG ObjectsPerPage; - LIST_ENTRY PageListHead; - struct _SLAB_CACHE_PAGE* FirstFreePage; - KSPIN_LOCK SlabLock; -} -SLAB_CACHE, *PSLAB_CACHE; - -typedef struct _SLAB_CACHE_BUFCTL -{ - struct _SLAB_CACHE_BUFCTL* NextFree; -} -SLAB_CACHE_BUFCTL, *PSLAB_CACHE_BUFCTL; - -typedef struct _SLAB_CACHE_PAGE -{ - LIST_ENTRY PageListEntry; - PSLAB_CACHE_BUFCTL FirstFreeBuffer; - ULONG ReferenceCount; -} -SLAB_CACHE_PAGE, *PSLAB_CACHE_PAGE; - -/* GLOBALS ******************************************************************/ - -/* FUNCTIONS ****************************************************************/ - -PSLAB_CACHE -ExCreateSlabCache(PUNICODE_STRING Name, ULONG Size, ULONG Align, - SLAB_CACHE_CONSTRUCTOR Constructor, - SLAB_CACHE_DESTRUCTOR Destructor) -{ - PSLAB_CACHE Slab; - ULONG ObjectSize; - ULONG AlignSize; - - Slab = ExAllocatePool(NonPagedPool, sizeof(SLAB_CACHE)); - if (Slab == NULL) - { - return(NULL); - } - - Slab->Constructor = Constructor; - Slab->Destructor = Destructor; - Slab->BaseSize = Size; - ObjectSize = Size + sizeof(SLAB_CACHE_BUFCTL); - AlignSize = Align - (ObjectSize % Align); - Slab->ObjectSize = ObjectSize + AlignSize; - Slab->ObjectsPerPage = - (PAGE_SIZE - sizeof(SLAB_CACHE_PAGE)) / Slab->ObjectSize; - Slab->FirstFreePage = NULL; - InitializeListHead(&Slab->PageListHead); - KeInitializeSpinLock(&Slab->SlabLock); - - return(Slab); -} - -PSLAB_CACHE_PAGE -ExGrowSlabCache(PSLAB_CACHE Slab) -{ - PSLAB_CACHE_PAGE SlabPage; - PFN_TYPE Pfn; - PVOID Page; - NTSTATUS Status; - ULONG i; - PSLAB_CACHE_BUFCTL BufCtl; - PVOID Object; - - Status = MmRequestPageMemoryConsumer(MC_NPPOOL, TRUE, &Pfn); - if (!NT_SUCCESS(Status)) - { - return(NULL); - } - - Page = ExAllocatePageWithPhysPage(Pfn); - if (Page == NULL) - { - MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); - return(NULL); - } - - SlabPage = (PSLAB_CACHE_PAGE)((char*)Page + PAGE_SIZE - sizeof(SLAB_CACHE_PAGE)); - SlabPage->ReferenceCount = 0; - SlabPage->FirstFreeBuffer = (PSLAB_CACHE_BUFCTL)Page; - for (i = 0; i < Slab->ObjectsPerPage; i++) - { - BufCtl = (PSLAB_CACHE_BUFCTL)((char*)Page + (i * Slab->ObjectSize)); - Object = (PVOID)(BufCtl + 1); - if (Slab->Constructor != NULL) - { - Slab->Constructor(Object, Slab->BaseSize); - } - if (i == (Slab->ObjectsPerPage - 1)) - { - BufCtl->NextFree = - (PSLAB_CACHE_BUFCTL)((char*)Page + ((i + 1) * Slab->ObjectSize)); - } - else - { - BufCtl->NextFree = NULL; - } - } - - return(SlabPage); -} - -PVOID -ExAllocateSlabCache(PSLAB_CACHE Slab, BOOLEAN MayWait) -{ - KIRQL oldIrql; - PSLAB_CACHE_PAGE Page; - PVOID Object; - BOOLEAN NewPage; - - KeAcquireSpinLock(&Slab->SlabLock, &oldIrql); - - /* - * Check if there is a page with free objects - * present, if so allocate from it, if - * not grow the slab. - */ - if (Slab->FirstFreePage == NULL) - { - KeReleaseSpinLock(&Slab->SlabLock, oldIrql); - Page = ExGrowSlabCache(Slab); - NewPage = TRUE; - KeAcquireSpinLock(&Slab->SlabLock, &oldIrql); - } - else - { - Page = Slab->FirstFreePage; - NewPage = FALSE; - } - - /* - * We shouldn't have got a page without free buffers. - */ - if (Page->FirstFreeBuffer == NULL) - { - DPRINT1("First free page had no free buffers.\n"); - KEBUGCHECK(0); - } - - /* - * Allocate the first free object from the page. - */ - Object = (PVOID)((char*)Page->FirstFreeBuffer + sizeof(SLAB_CACHE_BUFCTL)); - Page->FirstFreeBuffer = Page->FirstFreeBuffer->NextFree; - Page->ReferenceCount++; - - /* - * If we just allocated all the objects from this page - * and it was the first free page then adjust the - * first free page pointer and move the page to the head - * of the list. - */ - if (Page->ReferenceCount == Slab->ObjectsPerPage && !NewPage) - { - if (Page->PageListEntry.Flink == &Slab->PageListHead) - { - Slab->FirstFreePage = NULL; - } - else - { - PSLAB_CACHE_PAGE NextPage; - - NextPage = CONTAINING_RECORD(Page->PageListEntry.Flink, - SLAB_CACHE_PAGE, - PageListEntry); - Slab->FirstFreePage = NextPage; - } - RemoveEntryList(&Page->PageListEntry); - InsertHeadList(&Slab->PageListHead, &Page->PageListEntry); - } - /* - * Otherwise if we created a new page then add it to the end of - * the page list. - */ - else if (NewPage) - { - InsertTailList(&Slab->PageListHead, &Page->PageListEntry); - if (Slab->FirstFreePage == NULL) - { - Slab->FirstFreePage = Page; - } - } - KeReleaseSpinLock(&Slab->SlabLock, oldIrql); - return(Object); -} - -VOID -ExFreeFromPageSlabCache(PSLAB_CACHE Slab, - PSLAB_CACHE_PAGE Page, - PVOID Object) -{ - PSLAB_CACHE_BUFCTL BufCtl; - - BufCtl = (PSLAB_CACHE_BUFCTL)((char*)Object - sizeof(SLAB_CACHE_BUFCTL)); - BufCtl->NextFree = Page->FirstFreeBuffer; - Page->FirstFreeBuffer = BufCtl; - Page->ReferenceCount--; -} - -VOID -ExFreeSlabCache(PSLAB_CACHE Slab, PVOID Object) -{ - KIRQL oldIrql; - PLIST_ENTRY current_entry; - PSLAB_CACHE_PAGE current; - - KeAcquireSpinLock(&Slab->SlabLock, &oldIrql); - current_entry = Slab->PageListHead.Flink; - while (current_entry != &Slab->PageListHead) - { - PVOID Base; - - current = CONTAINING_RECORD(current_entry, - SLAB_CACHE_PAGE, - PageListEntry); - Base = (PVOID)((char*)current + sizeof(SLAB_CACHE_PAGE) - PAGE_SIZE); - if (Base >= Object && - ((char*)Base + PAGE_SIZE - sizeof(SLAB_CACHE_PAGE)) >= - ((char*)Object + Slab->ObjectSize)) - { - ExFreeFromPageSlabCache(Slab, current, Object); - /* - * If the page just become free then rearrange things. - */ - if (current->ReferenceCount == 0) - { - RemoveEntryList(¤t->PageListEntry); - InsertTailList(&Slab->PageListHead, ¤t->PageListEntry); - if (Slab->FirstFreePage == NULL) - { - Slab->FirstFreePage = current; - } - } - KeReleaseSpinLock(&Slab->SlabLock, oldIrql); - return; - } - } - DPRINT1("Tried to free object not in cache.\n"); - KEBUGCHECK(0); -} - -VOID -ExDestroySlabCache(PSLAB_CACHE Slab) -{ - PLIST_ENTRY current_entry; - PSLAB_CACHE_PAGE current; - ULONG i; - PVOID Object; - - current_entry = Slab->PageListHead.Flink; - while (current_entry != &Slab->PageListHead) - { - PVOID Base; - PFN_TYPE Page; - - current = CONTAINING_RECORD(current_entry, - SLAB_CACHE_PAGE, - PageListEntry); - Base = (PVOID)((char*)current + sizeof(SLAB_CACHE_PAGE) - PAGE_SIZE); - if (Slab->Destructor != NULL) - { - for (i = 0; i < Slab->ObjectsPerPage; i++) - { - Object = (char*)Base + (i * Slab->ObjectSize) + - sizeof(SLAB_CACHE_BUFCTL); - Slab->Destructor(Object, Slab->BaseSize); - } - } - Page = MmGetPfnForProcess(NULL, Base); - ExUnmapPage(Base); - MmReleasePageMemoryConsumer(MC_NPPOOL, Page); - } - ExFreePool(Slab); -}
19 years, 11 months
1
0
0
0
[hbirr] 13288: - Implemented a kernel mapping region which is process local.
by hbirr@svn.reactos.com
- Implemented a kernel mapping region which is process local. This mapping can be used to map temporary memory pages from other process's like pde's/pte's. It is also used to make a copy of a page or to clean a page. Modified: trunk/reactos/ntoskrnl/Makefile Modified: trunk/reactos/ntoskrnl/include/internal/mm.h Modified: trunk/reactos/ntoskrnl/ke/i386/multiboot.S Modified: trunk/reactos/ntoskrnl/mm/freelist.c Modified: trunk/reactos/ntoskrnl/mm/i386/page.c Modified: trunk/reactos/ntoskrnl/mm/kmap.c Modified: trunk/reactos/ntoskrnl/mm/mminit.c Modified: trunk/reactos/ntoskrnl/mm/section.c _____ Modified: trunk/reactos/ntoskrnl/Makefile --- trunk/reactos/ntoskrnl/Makefile 2005-01-25 22:36:28 UTC (rev 13287) +++ trunk/reactos/ntoskrnl/Makefile 2005-01-25 22:50:47 UTC (rev 13288) @@ -148,7 +148,6 @@ mm/region.o \ mm/rmap.o \ mm/section.o \ - mm/slab.o \ mm/verifier.o \ mm/virtual.o \ mm/wset.o _____ Modified: trunk/reactos/ntoskrnl/include/internal/mm.h --- trunk/reactos/ntoskrnl/include/internal/mm.h 2005-01-25 22:36:28 UTC (rev 13287) +++ trunk/reactos/ntoskrnl/include/internal/mm.h 2005-01-25 22:50:47 UTC (rev 13288) @@ -551,8 +551,6 @@ VOID ExUnmapPage(PVOID Addr); -VOID MiInitKernelMap(VOID); - PVOID ExAllocatePageWithPhysPage(PFN_TYPE Page); NTSTATUS MiCopyFromUserPage(PFN_TYPE Page, PVOID SourceAddress); @@ -649,6 +647,12 @@ /* i386/page.c *********************************************************/ +PVOID MmCreateHyperspaceMapping(PFN_TYPE Page); + +PFN_TYPE MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE Page); + +PFN_TYPE MmDeleteHyperspaceMapping(PVOID Address); + NTSTATUS MmCreateVirtualMappingForKernel(PVOID Address, ULONG flProtect, PPFN_TYPE Pages, _____ Modified: trunk/reactos/ntoskrnl/ke/i386/multiboot.S --- trunk/reactos/ntoskrnl/ke/i386/multiboot.S 2005-01-25 22:36:28 UTC (rev 13287) +++ trunk/reactos/ntoskrnl/ke/i386/multiboot.S 2005-01-25 22:50:47 UTC (rev 13288) @@ -114,7 +114,7 @@ movl $(V2P(kernel_pagetable+4096) + 0x3), ((KERNEL_BASE >> 20) + 4)(%esi) movl $(V2P(startup_pagedirectory) + 0x3), 0xF00(%esi) - movl $(V2P(kernelmap_pagetable) + 0x3), 0xF0C(%esi) + movl $(V2P(hyperspace_pagetable) + 0x3), 0xF08(%esi) #ifdef CONFIG_SMP movl $(V2P(apic_pagetable) + 0x3), 0xFEC(%esi) #endif /* CONFIG_SMP */ @@ -351,8 +351,9 @@ kernel_pagetable: .fill 2*4096, 1, 0 -kernelmap_pagetable: +hyperspace_pagetable: .fill 4096, 1, 0 + _pae_pagedirtable: .fill 4096, 1, 0 #ifdef CONFIG_SMP _____ Modified: trunk/reactos/ntoskrnl/mm/freelist.c --- trunk/reactos/ntoskrnl/mm/freelist.c 2005-01-25 22:36:28 UTC (rev 13287) +++ trunk/reactos/ntoskrnl/mm/freelist.c 2005-01-25 22:50:47 UTC (rev 13288) @@ -56,9 +56,10 @@ static LIST_ENTRY FreeUnzeroedPageListHead; static LIST_ENTRY BiosPageListHead; -static HANDLE ZeroPageThreadHandle; +static PETHREAD ZeroPageThread; static CLIENT_ID ZeroPageThreadId; static KEVENT ZeroPageThreadEvent; +static BOOLEAN ZeroPageThreadShouldTerminate = FALSE; static ULONG UnzeroedPageCount = 0; @@ -381,6 +382,11 @@ KEBUGCHECK(0); } } + else + { + /* Setting the page protection is necessary to set the global bit on IA32 */ + MmSetPageProtect(NULL, Address, PAGE_READWRITE); + } memset(Address, 0, PAGE_SIZE); start = ((ULONG_PTR)Address - (ULONG_PTR)MmPageArray) / sizeof(PHYSICAL_PAGE); @@ -1046,7 +1052,7 @@ return NumberOfPagesFound; } -NTSTATUS STDCALL +VOID STDCALL MmZeroPageThreadMain(PVOID Ignored) { NTSTATUS Status; @@ -1054,7 +1060,6 @@ PLIST_ENTRY ListEntry; PPHYSICAL_PAGE PageDescriptor; PFN_TYPE Pfn; - static PVOID Address = NULL; ULONG Count; while(1) @@ -1068,9 +1073,14 @@ { DbgPrint("ZeroPageThread: Wait failed\n"); KEBUGCHECK(0); - return(STATUS_UNSUCCESSFUL); + return; } + if (ZeroPageThreadShouldTerminate) + { + DbgPrint("ZeroPageThread: Terminating\n"); + return; + } Count = 0; KeAcquireSpinLock(&PageListLock, &oldIrql); while (!IsListEmpty(&FreeUnzeroedPageListHead)) @@ -1081,27 +1091,9 @@ /* We set the page to used, because MmCreateVirtualMapping failed with unused pages */ PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_USED; KeReleaseSpinLock(&PageListLock, oldIrql); - Count++; Pfn = PageDescriptor - MmPageArray; - if (Address == NULL) - { - Address = ExAllocatePageWithPhysPage(Pfn); - } - else - { - Status = MmCreateVirtualMapping(NULL, - Address, - PAGE_READWRITE | PAGE_SYSTEM, - &Pfn, - 1); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Unable to create virtual mapping\n"); - KEBUGCHECK(0); - } - } - memset(Address, 0, PAGE_SIZE); - MmDeleteVirtualMapping(NULL, (PVOID)Address, FALSE, NULL, NULL); + Status = MiZeroPage(Pfn); + KeAcquireSpinLock(&PageListLock, &oldIrql); if (PageDescriptor->MapCount != 0) { @@ -1110,7 +1102,17 @@ } PageDescriptor->Flags.Zero = 1; PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_FREE; - InsertHeadList(&FreeZeroedPageListHead, ListEntry); + if (NT_SUCCESS(Status)) + { + InsertHeadList(&FreeZeroedPageListHead, ListEntry); + Count++; + } + else + { + InsertHeadList(&FreeUnzeroedPageListHead, ListEntry); + UnzeroedPageCount++; + } + } DPRINT("Zeroed %d pages.\n", Count); KeResetEvent(&ZeroPageThreadEvent); @@ -1121,28 +1123,36 @@ NTSTATUS INIT_FUNCTION MmInitZeroPageThread(VOID) { - KPRIORITY Priority; NTSTATUS Status; - - Status = PsCreateSystemThread(&ZeroPageThreadHandle, + HANDLE ThreadHandle; + + ZeroPageThreadShouldTerminate = FALSE; + Status = PsCreateSystemThread(&ThreadHandle, THREAD_ALL_ACCESS, NULL, NULL, &ZeroPageThreadId, - (PKSTART_ROUTINE) MmZeroPageThreadMain, + MmZeroPageThreadMain, NULL); if (!NT_SUCCESS(Status)) { - return(Status); + KEBUGCHECK(0); } - Priority = 1; - NtSetInformationThread(ZeroPageThreadHandle, - ThreadPriority, - &Priority, - sizeof(Priority)); + Status = ObReferenceObjectByHandle(ThreadHandle, + THREAD_ALL_ACCESS, + PsThreadType, + KernelMode, + (PVOID*)&ZeroPageThread, + NULL); + if (!NT_SUCCESS(Status)) + { + KEBUGCHECK(0); + } - return(STATUS_SUCCESS); + KeSetPriorityThread(&ZeroPageThread->Tcb, LOW_PRIORITY); + NtClose(ThreadHandle); + return STATUS_SUCCESS; } /* EOF */ _____ Modified: trunk/reactos/ntoskrnl/mm/i386/page.c --- trunk/reactos/ntoskrnl/mm/i386/page.c 2005-01-25 22:36:28 UTC (rev 13287) +++ trunk/reactos/ntoskrnl/mm/i386/page.c 2005-01-25 22:50:47 UTC (rev 13288) @@ -52,11 +52,14 @@ #define PA_ACCESSED (1 << PA_BIT_ACCESSED) #define PA_GLOBAL (1 << PA_BIT_GLOBAL) -#define PAGETABLE_MAP (0xf0000000) -#define PAGEDIRECTORY_MAP (0xf0000000 + (PAGETABLE_MAP / (1024))) +#define PAGETABLE_MAP (0xf0000000) +#define PAGEDIRECTORY_MAP (0xf0000000 + (PAGETABLE_MAP / (1024))) #define PAE_PAGEDIRECTORY_MAP (0xf0000000 + (PAGETABLE_MAP / (512))) +#define HYPERSPACE (0xf0800000) +#define IS_HYPERSPACE(v) (((ULONG)(v) >= 0xF0800000 && (ULONG)(v) < 0xF0C00000)) + ULONG MmGlobalKernelPageDirectory[1024]; ULONGLONG MmGlobalKernelPageDirectoryForPAE[2048]; @@ -237,12 +240,12 @@ PULONGLONG Pde; ULONG k; - PageDirTable = (PULONGLONG)ExAllocatePageWithPhysPage(Process->Pcb.DirectoryTableBase.Q uadPart >> PAGE_SHIFT); + PageDirTable = (PULONGLONG)MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(Process->Pcb.Direct oryTableBase.QuadPart)); for (i = 0; i < 4; i++) { + PageDir = (PULONGLONG)MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(PageDirTable[i])); if (i < PAE_ADDR_TO_PDTE_OFFSET(KERNEL_BASE)) { - PageDir = (PULONGLONG)ExAllocatePageWithPhysPage(PageDirTable[i] >> PAGE_SHIFT); for (j = 0; j < 512; j++) { if (PageDir[j] != 0LL) @@ -251,7 +254,7 @@ Process->UniqueProcessId, (i * 512 + j) * 512 * PAGE_SIZE, (i * 512 + j + 1) * 512 * PAGE_SIZE - 1, Process->AddressSpace.PageTableRefCountTable[i*512 + j]); - Pde = ExAllocatePageWithPhysPage(PageDir[j] >> PAGE_SHIFT); + Pde = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(PageDir[j])); for (k = 0; k < 512; k++) { if(Pde[k] != 0) @@ -268,21 +271,27 @@ } } } - ExUnmapPage(Pde); + MmDeleteHyperspaceMapping(Pde); MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(PageDir[j])); } } - ExUnmapPage(PageDir); } - MmReleasePageMemoryConsumer(MC_NPPOOL, PageDirTable[i] >> PAGE_SHIFT); + else + { + MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(HYPERSPACE)])); + MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(HYPERSPACE)+1])); + } + MmDeleteHyperspaceMapping(PageDir); + MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(PageDirTable[i])); } - ExUnmapPage((PVOID)PageDirTable); + MmDeleteHyperspaceMapping((PVOID)PageDirTable); + MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(Process->Pcb.DirectoryTableBase.QuadPart)); } else { PULONG Pde; PULONG PageDir; - PageDir = ExAllocatePageWithPhysPage(Process->Pcb.DirectoryTableBase.QuadPart >> PAGE_SHIFT); + PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.u.L owPart)); for (i = 0; i < ADDR_TO_PDE_OFFSET(KERNEL_BASE); i++) { if (PageDir[i] != 0) @@ -290,7 +299,7 @@ DPRINT1("Pde for %08x - %08x is not freed, RefCount %d\n", i * 4 * 1024 * 1024, (i + 1) * 4 * 1024 * 1024 - 1, Process->AddressSpace.PageTableRefCountTable[i]); - Pde = ExAllocatePageWithPhysPage(PageDir[i] >> PAGE_SHIFT); + Pde = MmCreateHyperspaceMapping(PTE_TO_PFN(PageDir[i])); for (j = 0; j < 1024; j++) { if(Pde[j] != 0) @@ -307,14 +316,15 @@ } } } - ExUnmapPage(Pde); + MmDeleteHyperspaceMapping(Pde); MmReleasePageMemoryConsumer(MC_NPPOOL, PTE_TO_PFN(PageDir[i])); } } - ExUnmapPage(PageDir); + MmReleasePageMemoryConsumer(MC_NPPOOL, PTE_TO_PFN(PageDir[ADDR_TO_PDE_OFFSET(HYPERSPACE)])); + MmDeleteHyperspaceMapping(PageDir); + MmReleasePageMemoryConsumer(MC_NPPOOL, PTE_TO_PFN(Process->Pcb.DirectoryTableBase.u.LowPart)); } - MmReleasePageMemoryConsumer(MC_NPPOOL, Process->Pcb.DirectoryTableBase.QuadPart >> PAGE_SHIFT); #if defined(__GNUC__) Process->Pcb.DirectoryTableBase.QuadPart = 0LL; @@ -329,87 +339,75 @@ NTSTATUS MmCopyMmInfo(PEPROCESS Src, PEPROCESS Dest) { - PHYSICAL_ADDRESS PhysPageDirectory; PKPROCESS KProcess = &Dest->Pcb; - + NTSTATUS Status; + ULONG i, j; + PFN_TYPE Pfn[7]; + ULONG Count; + DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", Src, Dest); + Count = Ke386Pae ? 7 : 2; + + for (i = 0; i < Count; i++) + { + Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn[i]); + if (!NT_SUCCESS(Status)) + { + for (j = 0; j < i; j++) + { + MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn[j]); + } + return Status; + } + } + if (Ke386Pae) { PULONGLONG PageDirTable; PULONGLONG PageDir; - PFN_TYPE Pfn[4]; - ULONG i, j; - NTSTATUS Status; - PageDirTable = ExAllocatePage(); - if (PageDirTable == NULL) - { - return STATUS_UNSUCCESSFUL; - } - PhysPageDirectory = MmGetPhysicalAddress(PageDirTable); - + PageDirTable = MmCreateHyperspaceMapping(Pfn[0]); for (i = 0; i < 4; i++) { - Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn[i]); - if (!NT_SUCCESS(Status)) - { - for (j = 0; j < i; j++) - { - MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn[j]); - } - ExUnmapPage(PageDirTable); - MmReleasePageMemoryConsumer(MC_NPPOOL, PhysPageDirectory.QuadPart >> PAGE_SHIFT); - return Status; - } - PageDirTable[i] = (Pfn[i] << PAGE_SHIFT) | PA_PRESENT; + PageDirTable[i] = PAE_PFN_TO_PTE(Pfn[1+i]) | PA_PRESENT; } - ExUnmapPage(PageDirTable); + MmDeleteHyperspaceMapping(PageDirTable); for (i = PAE_ADDR_TO_PDTE_OFFSET(KERNEL_BASE); i < 4; i++) { - PageDir = (PULONGLONG)ExAllocatePageWithPhysPage(Pfn[i]); - if (PageDir == NULL) - { - for (j = 0; j < 4; j++) - { - MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn[j]); - } - ExUnmapPage(PageDirTable); - MmReleasePageMemoryConsumer(MC_NPPOOL, PhysPageDirectory.QuadPart >> PAGE_SHIFT); - return STATUS_UNSUCCESSFUL; - } + PageDir = (PULONGLONG)MmCreateHyperspaceMapping(Pfn[i+1]); memcpy(PageDir, &MmGlobalKernelPageDirectoryForPAE[i * 512], 512 * sizeof(ULONGLONG)); if (PAE_ADDR_TO_PDTE_OFFSET(PAGETABLE_MAP) == i) { for (j = 0; j < 4; j++) { - PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(PAGETABLE_MAP) + j] = (Pfn[j] << PAGE_SHIFT) | PA_PRESENT | PA_READWRITE; + PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(PAGETABLE_MAP) + j] = PAE_PFN_TO_PTE(Pfn[1+j]) | PA_PRESENT | PA_READWRITE; } } - ExUnmapPage(PageDir); + if (PAE_ADDR_TO_PDTE_OFFSET(HYPERSPACE) == i) + { + PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(HYPERSPACE)] = PAE_PFN_TO_PTE(Pfn[5]) | PA_PRESENT | PA_READWRITE; + PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(HYPERSPACE)+1] = PAE_PFN_TO_PTE(Pfn[6]) | PA_PRESENT | PA_READWRITE; + } + MmDeleteHyperspaceMapping(PageDir); } } else { PULONG PageDirectory; - PageDirectory = ExAllocatePage(); - if (PageDirectory == NULL) - { - return(STATUS_UNSUCCESSFUL); - } - PhysPageDirectory = MmGetPhysicalAddress(PageDirectory); + PageDirectory = MmCreateHyperspaceMapping(Pfn[0]); memcpy(PageDirectory + ADDR_TO_PDE_OFFSET(KERNEL_BASE), MmGlobalKernelPageDirectory + ADDR_TO_PDE_OFFSET(KERNEL_BASE), (1024 - ADDR_TO_PDE_OFFSET(KERNEL_BASE)) * sizeof(ULONG)); - DPRINT("Addr %x\n",PAGETABLE_MAP / (4*1024*1024)); - PageDirectory[PAGETABLE_MAP / (4*1024*1024)] = - PhysPageDirectory.u.LowPart | PA_PRESENT | PA_READWRITE; + DPRINT("Addr %x\n",ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)); + PageDirectory[ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)] = PFN_TO_PTE(Pfn[0]) | PA_PRESENT | PA_READWRITE; + PageDirectory[ADDR_TO_PDE_OFFSET(HYPERSPACE)] = PFN_TO_PTE(Pfn[1]) | PA_PRESENT | PA_READWRITE; - ExUnmapPage(PageDirectory); + MmDeleteHyperspaceMapping(PageDirectory); } - KProcess->DirectoryTableBase = PhysPageDirectory; + KProcess->DirectoryTableBase.QuadPart = PFN_TO_PTE(Pfn[0]); DPRINT("Finished MmCopyMmInfo()\n"); return(STATUS_SUCCESS); } @@ -524,13 +522,13 @@ } if (Address < (PVOID)KERNEL_BASE && Process && Process != PsGetCurrentProcess()) { - PageDirTable = ExAllocatePageWithPhysPage(Process->Pcb.DirectoryTableBase.QuadPart >> PAGE_SHIFT); + PageDirTable = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(Process->Pcb.DirectoryTableBase .QuadPart)); if (PageDirTable == NULL) { KEBUGCHECK(0); } - PageDir = ExAllocatePageWithPhysPage(PageDirTable[PAE_ADDR_TO_PDTE_OFFSET(Address) ] >> PAGE_SHIFT); - ExUnmapPage(PageDirTable); + PageDir = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(PageDirTable[PAE_ADDR_TO_PDTE_O FFSET(Address)])); + MmDeleteHyperspaceMapping(PageDirTable); if (PageDir == NULL) { KEBUGCHECK(0); @@ -541,7 +539,7 @@ { if (Create == FALSE) { - ExUnmapPage(PageDir); + MmDeleteHyperspaceMapping(PageDir); return NULL; } Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); @@ -561,8 +559,8 @@ { Pfn = PAE_PTE_TO_PFN(Entry); } - ExUnmapPage(PageDir); - Pt = ExAllocatePageWithPhysPage(Pfn); + MmDeleteHyperspaceMapping(PageDir); + Pt = MmCreateHyperspaceMapping(Pfn); if (Pt == NULL) { KEBUGCHECK(0); @@ -630,7 +628,7 @@ if (Address < (PVOID)KERNEL_BASE && Process && Process != PsGetCurrentProcess()) { - PageDir = ExAllocatePageWithPhysPage(Process->Pcb.DirectoryTableBase.QuadPart >> PAGE_SHIFT); + PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.Qua dPart)); if (PageDir == NULL) { KEBUGCHECK(0); @@ -639,7 +637,7 @@ { if (Create == FALSE) { - ExUnmapPage(PageDir); + MmDeleteHyperspaceMapping(PageDir); return NULL; } Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn); @@ -658,8 +656,8 @@ { Pfn = PTE_TO_PFN(PageDir[PdeOffset]); } - ExUnmapPage(PageDir); - Pt = ExAllocatePageWithPhysPage(Pfn); + MmDeleteHyperspaceMapping(PageDir); + Pt = MmCreateHyperspaceMapping(Pfn); if (Pt == NULL) { KEBUGCHECK(0); @@ -733,7 +731,7 @@ } if (Pt) { - ExUnmapPage((PVOID)PAGE_ROUND_DOWN(Pt)); + MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pt)); } return FALSE; } @@ -1907,7 +1905,7 @@ { if (!MmIsUsablePage(Pages[i])) { - DPRINT1("Page at address %x not usable\n", Pages[i] << PAGE_SHIFT); + DPRINT1("Page at address %x not usable\n", PFN_TO_PTE(Pages[i])); KEBUGCHECK(0); } } @@ -2075,6 +2073,176 @@ return p; } +PVOID +MmCreateHyperspaceMapping(PFN_TYPE Page) +{ + PVOID Address; + LONG i; + + if (Ke386Pae) + { + ULONGLONG Entry; + ULONGLONG ZeroEntry = 0LL; + PULONGLONG Pte; + + Entry = PFN_TO_PTE(Page) | PA_PRESENT | PA_READWRITE; + Pte = PAE_ADDR_TO_PTE(HYPERSPACE) + Page % 1024; + + if (Page & 1024) + { + for (i = Page %1024; i < 1024; i++, Pte++) + { + if (0LL == ExfInterlockedCompareExchange64UL(Pte, &Entry, &ZeroEntry)) + { + break; + } + } + if (i >= 1024) + { + Pte = PAE_ADDR_TO_PTE(HYPERSPACE); + for (i = 0; i < Page % 1024; i++, Pte++) + { + if (0LL == ExfInterlockedCompareExchange64UL(Pte, &Entry, &ZeroEntry)) + { + break; + } + } + if (i >= Page % 1024) + { + KEBUGCHECK(0); + } + } + } + else + { + for (i = Page %1024; i >= 0; i--, Pte--) + { + if (0LL == ExfInterlockedCompareExchange64UL(Pte, &Entry, &ZeroEntry)) + { + break; + } + } + if (i < 0) + { + Pte = PAE_ADDR_TO_PTE(HYPERSPACE) + 1023; + for (i = 1023; i > Page % 1024; i--, Pte--) + { + if (0LL == ExfInterlockedCompareExchange64UL(Pte, &Entry, &ZeroEntry)) + { + break; + } + } + if (i <= Page % 1024) + { + KEBUGCHECK(0); + } + } + } + } + else + { + ULONG Entry; + PULONG Pte; + Entry = PFN_TO_PTE(Page) | PA_PRESENT | PA_READWRITE; + Pte = ADDR_TO_PTE(HYPERSPACE) + Page % 1024; + if (Page & 1024) + { + for (i = Page % 1024; i < 1024; i++, Pte++) + { + if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) + { + break; + } + } + if (i >= 1024) + { + Pte = ADDR_TO_PTE(HYPERSPACE); + for (i = 0; i < Page % 1024; i++, Pte++) + { + if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) + { + break; + } + } + if (i >= Page % 1024) + { + KEBUGCHECK(0); + } + } + } + else + { + for (i = Page % 1024; i >= 0; i--, Pte--) + { + if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) + { + break; + } + } + if (i < 0) + { + Pte = ADDR_TO_PTE(HYPERSPACE) + 1023; + for (i = 1023; i > Page % 1024; i--, Pte--) + { + if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0)) + { + break; + } + } + if (i <= Page % 1024) + { + KEBUGCHECK(0); + } + } + } + } + Address = (PVOID)HYPERSPACE + i * PAGE_SIZE; + FLUSH_TLB_ONE(Address); + return Address; +} + +PFN_TYPE +MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage) +{ + PFN_TYPE Pfn; + ASSERT (IS_HYPERSPACE(Address)); + if (Ke386Pae) + { + ULONGLONG Entry = PAE_PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE; + Entry = (ULONG)ExfpInterlockedExchange64UL(PAE_ADDR_TO_PTE(Address), &Entry); + Pfn = PAE_PTE_TO_PFN(Entry); + } + else + { + ULONG Entry; + Entry = InterlockedExchange(ADDR_TO_PTE(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE); + Pfn = PTE_TO_PFN(Entry); + } + FLUSH_TLB_ONE(Address); + return Pfn; +} + +PFN_TYPE +MmDeleteHyperspaceMapping(PVOID Address) +{ + PFN_TYPE Pfn; + ASSERT (IS_HYPERSPACE(Address)); + if (Ke386Pae) + { + ULONGLONG Entry = 0LL; + Entry = (ULONG)ExfpInterlockedExchange64UL(PAE_ADDR_TO_PTE(Address), &Entry); + Pfn = PAE_PTE_TO_PFN(Entry); + } + else + { + ULONG Entry; + Entry = InterlockedExchange(ADDR_TO_PTE(Address), 0); + Pfn = PTE_TO_PFN(Entry); + } + FLUSH_TLB_ONE(Address); + return Pfn; +} + VOID MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) { ULONG StartOffset, EndOffset, Offset; @@ -2111,9 +2279,9 @@ if (Process != NULL && Process != PsGetCurrentProcess()) { - PageDirTable = ExAllocatePageWithPhysPage(Process->Pcb.DirectoryTableBase.u.LowPart >> PAGE_SHIFT); - Pde = (PULONGLONG)ExAllocatePageWithPhysPage(PageDirTable[i] >> PAGE_SHIFT); - ExUnmapPage(PageDirTable); + PageDirTable = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(Process->Pcb.DirectoryTableBase .QuadPart)); + Pde = (PULONGLONG)MmCreateHyperspaceMapping(PTE_TO_PFN(PageDirTable[i])); + MmDeleteHyperspaceMapping(PageDirTable); } else { @@ -2138,7 +2306,7 @@ if (Process != NULL && Process != PsGetCurrentProcess()) { - Pde = ExAllocatePageWithPhysPage(Process->Pcb.DirectoryTableBase.u.LowPart >> PAGE_SHIFT); + Pde = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.u.L owPart)); } else { @@ -2153,22 +2321,26 @@ } if (Pde != (PULONG)PAGEDIRECTORY_MAP) { - ExUnmapPage(Pde); + MmDeleteHyperspaceMapping(Pde); } } } - + VOID INIT_FUNCTION MmInitGlobalKernelPageDirectory(VOID) { ULONG i; + + DPRINT("MmInitGlobalKernelPageDirectory()\n"); + if (Ke386Pae) { PULONGLONG CurrentPageDirectory = (PULONGLONG)PAE_PAGEDIRECTORY_MAP; for (i = PAE_ADDR_TO_PDE_OFFSET(KERNEL_BASE); i < 4 * 512; i++) { - if ((i < PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) || i >= PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + 4) && - 0LL == MmGlobalKernelPageDirectoryForPAE[i] && 0LL != CurrentPageDirectory[i]) + if (!(i >= PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) && i < PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + 4) && + !(i >= PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE) && i < PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE) + 2) && + 0LL == MmGlobalKernelPageDirectoryForPAE[i] && 0LL != CurrentPageDirectory[i]) { ExfpInterlockedExchange64UL(&MmGlobalKernelPageDirectoryForPAE[i], &CurrentPageDirectory[i]); if (Ke386GlobalPagesEnabled) @@ -2185,6 +2357,7 @@ for (i = ADDR_TO_PDE_OFFSET(KERNEL_BASE); i < 1024; i++) { if (i != ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) && + i != ADDR_TO_PDE_OFFSET(HYPERSPACE) && 0 == MmGlobalKernelPageDirectory[i] && 0 != CurrentPageDirectory[i]) { MmGlobalKernelPageDirectory[i] = CurrentPageDirectory[i]; @@ -2218,22 +2391,26 @@ memcpy(PageDirTable, (PVOID)PAGEDIRECTORY_MAP, PAGE_SIZE); PageDir = (PULONGLONG)*LastKernelAddress; - (*LastKernelAddress) += 4 * PAGE_SIZE; + (*LastKernelAddress) += 6 * PAGE_SIZE; PageDirTable[0] = MmGetPhysicalAddress((PVOID)PageDir).QuadPart | PA_PRESENT; PageDirTable[1] = PageDirTable[0] + PAGE_SIZE; PageDirTable[2] = PageDirTable[1] + PAGE_SIZE; PageDirTable[3] = PageDirTable[2] + PAGE_SIZE; - memset(PageDir, 0, 4 * PAGE_SIZE); + memset(PageDir, 0, 6 * PAGE_SIZE); for (i = 0; i < 4; i++) { - PageDir[3*512+PAE_ADDR_TO_PDE_PAGE_OFFSET(PAGETABLE_MAP) + i] = PageDirTable[i] | PA_READWRITE; + PageDir[PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + i] = PageDirTable[i] | PA_READWRITE; } + PageDir[PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE)] = (PageDirTable[0] + 4 * PAGE_SIZE) | PA_READWRITE; + PageDir[PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE)+1] = (PageDirTable[0] + 5 * PAGE_SIZE) | PA_READWRITE; for (i = 0; i < 2048; i++) { - if (i < PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) || i >= PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + 4) + if (!(i >= PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) && i < PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + 4) && + !(i >= PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE) && i < PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE)+2)) + { PVOID Address = (PVOID)(i * 512 * PAGE_SIZE); PULONG Pde = ADDR_TO_PDE(Address); @@ -2293,9 +2470,12 @@ MiInitPageDirectoryMap(VOID) { MEMORY_AREA* kernel_map_desc = NULL; + MEMORY_AREA* hyperspace_desc = NULL; PHYSICAL_ADDRESS BoundaryAddressMultiple; PVOID BaseAddress; + DPRINT("MiInitPageDirectoryMap()\n"); + BoundaryAddressMultiple.QuadPart = 0; BaseAddress = (PVOID)PAGETABLE_MAP; MmCreateMemoryArea(NULL, @@ -2308,6 +2488,17 @@ TRUE, FALSE, BoundaryAddressMultiple); + BaseAddress = (PVOID)HYPERSPACE; + MmCreateMemoryArea(NULL, + MmGetKernelAddressSpace(), + MEMORY_AREA_SYSTEM, + &BaseAddress, + 0x400000, + 0, + &hyperspace_desc, + TRUE, + FALSE, + BoundaryAddressMultiple); } /* EOF */ _____ Modified: trunk/reactos/ntoskrnl/mm/kmap.c --- trunk/reactos/ntoskrnl/mm/kmap.c 2005-01-25 22:36:28 UTC (rev 13287) +++ trunk/reactos/ntoskrnl/mm/kmap.c 2005-01-25 22:50:47 UTC (rev 13288) @@ -15,61 +15,19 @@ /* GLOBALS *****************************************************************/ -#define ALLOC_MAP_SIZE (MM_KERNEL_MAP_SIZE / PAGE_SIZE) - -/* - * One bit for each page in the kmalloc region - * If set then the page is used by a kmalloc block - */ -static UCHAR AllocMapBuffer[ROUND_UP(ALLOC_MAP_SIZE, 32) / 8]; -static RTL_BITMAP AllocMap; -static KSPIN_LOCK AllocMapLock; -static ULONG AllocMapHint = 0; - /* FUNCTIONS ***************************************************************/ - -VOID -ExUnmapPage(PVOID Addr) -{ - KIRQL oldIrql; - ULONG_PTR Base = ((ULONG_PTR)Addr - (ULONG_PTR)MM_KERNEL_MAP_BASE) / PAGE_SIZE; - - DPRINT("ExUnmapPage(Addr %x)\n",Addr); - - MmDeleteVirtualMapping(NULL, (PVOID)Addr, FALSE, NULL, NULL); - KeAcquireSpinLock(&AllocMapLock, &oldIrql); - RtlClearBits(&AllocMap, Base, 1); - AllocMapHint = min(AllocMapHint, Base); - KeReleaseSpinLock(&AllocMapLock, oldIrql); -} - -PVOID -ExAllocatePage(VOID) -{ - PFN_TYPE Page; - NTSTATUS Status; - - Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Page); - if (!NT_SUCCESS(Status)) - { - return(NULL); - } - - return(ExAllocatePageWithPhysPage(Page)); -} - NTSTATUS MiZeroPage(PFN_TYPE Page) { PVOID TempAddress; - TempAddress = ExAllocatePageWithPhysPage(Page); + TempAddress = MmCreateHyperspaceMapping(Page); if (TempAddress == NULL) { return(STATUS_NO_MEMORY); } memset(TempAddress, 0, PAGE_SIZE); - ExUnmapPage(TempAddress); + MmDeleteHyperspaceMapping(TempAddress); return(STATUS_SUCCESS); } @@ -78,99 +36,13 @@ { PVOID TempAddress; - TempAddress = ExAllocatePageWithPhysPage(DestPage); + TempAddress = MmCreateHyperspaceMapping(DestPage); if (TempAddress == NULL) { return(STATUS_NO_MEMORY); } memcpy(TempAddress, SourceAddress, PAGE_SIZE); - ExUnmapPage(TempAddress); + MmDeleteHyperspaceMapping(TempAddress); return(STATUS_SUCCESS); } -PVOID -ExAllocatePageWithPhysPage(PFN_TYPE Page) -{ - KIRQL oldlvl; - PVOID Addr; - ULONG_PTR Base; - NTSTATUS Status; - - KeAcquireSpinLock(&AllocMapLock, &oldlvl); - Base = RtlFindClearBitsAndSet(&AllocMap, 1, AllocMapHint); - if (Base != (ULONG_PTR)-1) - { - AllocMapHint = Base + 1; - KeReleaseSpinLock(&AllocMapLock, oldlvl); - Addr = (char*)MM_KERNEL_MAP_BASE + Base * PAGE_SIZE; - Status = MmCreateVirtualMapping(NULL, - Addr, - PAGE_READWRITE | PAGE_SYSTEM, - &Page, - 1); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Unable to create virtual mapping\n"); - KEBUGCHECK(0); - } - return Addr; - } - KeReleaseSpinLock(&AllocMapLock, oldlvl); - return NULL; -} - -VOID INIT_FUNCTION -MiInitKernelMap(VOID) -{ - KeInitializeSpinLock(&AllocMapLock); - RtlInitializeBitMap(&AllocMap, (PULONG)AllocMapBuffer, ALLOC_MAP_SIZE); - RtlClearAllBits(&AllocMap); -} - -VOID -MiFreeNonPagedPoolRegion(PVOID Addr, ULONG Count, BOOLEAN Free) -{ - ULONG i; - ULONG_PTR Base = ((char*)Addr - (char*)MM_KERNEL_MAP_BASE) / PAGE_SIZE; - KIRQL oldlvl; - - for (i = 0; i < Count; i++) - { - MmDeleteVirtualMapping(NULL, - (char*)Addr + (i * PAGE_SIZE), - Free, - NULL, - NULL); - } - KeAcquireSpinLock(&AllocMapLock, &oldlvl); - RtlClearBits(&AllocMap, Base, Count); - AllocMapHint = min(AllocMapHint, Base); - KeReleaseSpinLock(&AllocMapLock, oldlvl); -} - -PVOID -MiAllocNonPagedPoolRegion(ULONG nr_pages) -/* - * FUNCTION: Allocates a region of pages within the nonpaged pool area - */ -{ - ULONG_PTR Base; - KIRQL oldlvl; - - KeAcquireSpinLock(&AllocMapLock, &oldlvl); - Base = RtlFindClearBitsAndSet(&AllocMap, nr_pages, AllocMapHint); - if (Base == (ULONG_PTR)-1) - { - DbgPrint("CRITICAL: Out of non-paged pool space\n"); - KEBUGCHECK(0); - } - if (AllocMapHint == Base) - { - AllocMapHint += nr_pages; - } - KeReleaseSpinLock(&AllocMapLock, oldlvl); [truncated at 1000 lines; 81 more skipped]
19 years, 11 months
1
0
0
0
[hbirr] 13287: - Renamed UpdateProgress to VfatxUpdateProgress.
by hbirr@svn.reactos.com
- Renamed UpdateProgress to VfatxUpdateProgress. Modified: trunk/reactos/lib/fslib/vfatxlib/fatx.c Modified: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h _____ Modified: trunk/reactos/lib/fslib/vfatxlib/fatx.c --- trunk/reactos/lib/fslib/vfatxlib/fatx.c 2005-01-25 22:10:39 UTC (rev 13286) +++ trunk/reactos/lib/fslib/vfatxlib/fatx.c 2005-01-25 22:36:28 UTC (rev 13287) @@ -90,7 +90,7 @@ return Status; } - UpdateProgress (Context, 1); + VfatxUpdateProgress (Context, 1); /* Free the new boot sector */ RtlFreeHeap(RtlGetProcessHeap(), 0, NewBootSector); @@ -148,7 +148,7 @@ return(Status); } - UpdateProgress (Context, 1); + VfatxUpdateProgress (Context, 1); /* Zero the begin of the buffer */ memset(Buffer, 0, 4); @@ -180,7 +180,7 @@ return(Status); } - UpdateProgress (Context, Sectors); + VfatxUpdateProgress (Context, Sectors); } /* Free the buffer */ @@ -241,7 +241,7 @@ return(Status); } - UpdateProgress (Context, 1); + VfatxUpdateProgress (Context, 1); /* Zero the begin of the buffer */ memset(Buffer, 0, 8); @@ -274,7 +274,7 @@ return(Status); } - UpdateProgress (Context, Sectors); + VfatxUpdateProgress (Context, Sectors); } /* Free the buffer */ _____ Modified: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h --- trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h 2005-01-25 22:10:39 UTC (rev 13286) +++ trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h 2005-01-25 22:36:28 UTC (rev 13287) @@ -39,7 +39,7 @@ PFORMAT_CONTEXT Context); VOID -UpdateProgress (PFORMAT_CONTEXT Context, - ULONG Increment); +VfatxUpdateProgress (PFORMAT_CONTEXT Context, + ULONG Increment); /* EOF */
19 years, 11 months
1
0
0
0
[hbirr] 13286: - Added vfatxlib.
by hbirr@svn.reactos.com
- Added vfatxlib. Added: trunk/reactos/include/fslib/vfatxlib.h Added: trunk/reactos/lib/fslib/vfatxlib/ Added: trunk/reactos/lib/fslib/vfatxlib/Makefile Added: trunk/reactos/lib/fslib/vfatxlib/fatx.c Added: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c Added: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h _____ Added: trunk/reactos/include/fslib/vfatxlib.h --- trunk/reactos/include/fslib/vfatxlib.h 2005-01-25 21:16:19 UTC (rev 13285) +++ trunk/reactos/include/fslib/vfatxlib.h 2005-01-25 22:10:39 UTC (rev 13286) @@ -0,0 +1,24 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS VFAT filesystem library + * FILE: include/fslib/vfatlib.h + * PURPOSE: Public definitions for vfat filesystem library + */ +#ifndef __VFATXLIB_H +#define __VFATXLIB_H + +#include <fmifs.h> + +NTSTATUS +VfatxInitialize (VOID); + +NTSTATUS +VfatxCleanup (VOID); + +NTSTATUS +VfatxFormat (PUNICODE_STRING DriveRoot, + ULONG MediaFlag, + BOOLEAN QuickFormat, + PFMIFSCALLBACK Callback); + +#endif /*__VFATLIB_H */ _____ Added: trunk/reactos/lib/fslib/vfatxlib/Makefile --- trunk/reactos/lib/fslib/vfatxlib/Makefile 2005-01-25 21:16:19 UTC (rev 13285) +++ trunk/reactos/lib/fslib/vfatxlib/Makefile 2005-01-25 22:10:39 UTC (rev 13286) @@ -0,0 +1,18 @@ +# $Id$ + +PATH_TO_TOP = ../../.. + +TARGET_TYPE = library + +TARGET_NAME = vfatxlib + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror + +TARGET_OBJECTS = \ + fatx.o \ + vfatxlib.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk _____ Added: trunk/reactos/lib/fslib/vfatxlib/fatx.c --- trunk/reactos/lib/fslib/vfatxlib/fatx.c 2005-01-25 21:16:19 UTC (rev 13285) +++ trunk/reactos/lib/fslib/vfatxlib/fatx.c 2005-01-25 22:10:39 UTC (rev 13286) @@ -0,0 +1,431 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS VFATX filesystem library + * FILE: fatx.c + * PURPOSE: Fatx support + * PROGRAMMERS: Hartmut Birr + * REVISIONS: + */ +#define NDEBUG +#include <debug.h> +#define NTOS_MODE_USER +#include <ntos.h> +#include <ddk/ntddscsi.h> +#include <mem.h> +#include "vfatxlib.h" + + +static ULONG +GetShiftCount(ULONG Value) +{ + ULONG i = 1; + while (Value > 0) + { + i++; + Value /= 2; + } + return i - 2; +} + + +static ULONG +CalcVolumeSerialNumber(VOID) +{ + LARGE_INTEGER SystemTime; + TIME_FIELDS TimeFields; + ULONG Serial; + PUCHAR Buffer; + + NtQuerySystemTime (&SystemTime); + RtlTimeToTimeFields (&SystemTime, &TimeFields); + + Buffer = (PUCHAR)&Serial; + Buffer[0] = (UCHAR)(TimeFields.Year & 0xFF) + (UCHAR)(TimeFields.Hour & 0xFF); + Buffer[1] = (UCHAR)(TimeFields.Year >> 8) + (UCHAR)(TimeFields.Minute & 0xFF); + Buffer[2] = (UCHAR)(TimeFields.Month & 0xFF) + (UCHAR)(TimeFields.Second & 0xFF); + Buffer[3] = (UCHAR)(TimeFields.Day & 0xFF) + (UCHAR)(TimeFields.Milliseconds & 0xFF); + + return Serial; +} + + +static NTSTATUS +FatxWriteBootSector (IN HANDLE FileHandle, + IN PFATX_BOOT_SECTOR BootSector, + IN OUT PFORMAT_CONTEXT Context) +{ + IO_STATUS_BLOCK IoStatusBlock; + NTSTATUS Status; + PUCHAR NewBootSector; + LARGE_INTEGER FileOffset; + + /* Allocate buffer for new bootsector */ + NewBootSector = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + 0, + sizeof(FATX_BOOT_SECTOR)); + if (NewBootSector == NULL) + return(STATUS_INSUFFICIENT_RESOURCES); + + /* Zero the new bootsector */ + memset(NewBootSector, 0, sizeof(FATX_BOOT_SECTOR)); + + /* Copy FAT16 BPB to new bootsector */ + memcpy(NewBootSector, BootSector, 18); /* FAT16 BPB length (up to (not including) Res2) */ + + /* Write sector 0 */ + FileOffset.QuadPart = 0ULL; + Status = NtWriteFile(FileHandle, + NULL, + NULL, + NULL, + &IoStatusBlock, + NewBootSector, + sizeof(FATX_BOOT_SECTOR), + &FileOffset, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtWriteFile() failed (Status %lx)\n", Status); + RtlFreeHeap(RtlGetProcessHeap(), 0, NewBootSector); + return Status; + } + + UpdateProgress (Context, 1); + + /* Free the new boot sector */ + RtlFreeHeap(RtlGetProcessHeap(), 0, NewBootSector); + + return Status; +} + + +static NTSTATUS +Fatx16WriteFAT (IN HANDLE FileHandle, + IN ULONG SectorOffset, + IN ULONG FATSectors, + IN OUT PFORMAT_CONTEXT Context) +{ + IO_STATUS_BLOCK IoStatusBlock; + NTSTATUS Status; + PUCHAR Buffer; + LARGE_INTEGER FileOffset; + ULONG i; + ULONG Sectors; + + /* Allocate buffer */ + Buffer = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + 0, + 32 * 1024); + if (Buffer == NULL) + return(STATUS_INSUFFICIENT_RESOURCES); + + /* Zero the buffer */ + memset(Buffer, 0, 32 * 1024); + + /* FAT cluster 0 */ + Buffer[0] = 0xf8; /* Media type */ + Buffer[1] = 0xff; + + /* FAT cluster 1 */ + Buffer[2] = 0xff; /* Clean shutdown, no disk read/write errors, end-of-cluster (EOC) mark */ + Buffer[3] = 0xff; + + /* Write first sector of the FAT */ + FileOffset.QuadPart = (SectorOffset * 512) + sizeof(FATX_BOOT_SECTOR); + Status = NtWriteFile(FileHandle, + NULL, + NULL, + NULL, + &IoStatusBlock, + Buffer, + 512, + &FileOffset, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtWriteFile() failed (Status %lx)\n", Status); + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + return(Status); + } + + UpdateProgress (Context, 1); + + /* Zero the begin of the buffer */ + memset(Buffer, 0, 4); + + /* Zero the rest of the FAT */ + Sectors = 32 * 1024 / 512; + for (i = 1; i < FATSectors; i += Sectors) + { + /* Zero some sectors of the FAT */ + FileOffset.QuadPart = (SectorOffset + i) * 512 + sizeof(FATX_BOOT_SECTOR) ; + if ((FATSectors - i) <= Sectors) + { + Sectors = FATSectors - i; + } + + Status = NtWriteFile(FileHandle, + NULL, + NULL, + NULL, + &IoStatusBlock, + Buffer, + Sectors * 512, + &FileOffset, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtWriteFile() failed (Status %lx)\n", Status); + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + return(Status); + } + + UpdateProgress (Context, Sectors); + } + + /* Free the buffer */ + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + + return(Status); +} + +static NTSTATUS +Fatx32WriteFAT (IN HANDLE FileHandle, + IN ULONG SectorOffset, + IN ULONG FATSectors, + IN OUT PFORMAT_CONTEXT Context) +{ + IO_STATUS_BLOCK IoStatusBlock; + NTSTATUS Status; + PUCHAR Buffer; + LARGE_INTEGER FileOffset; + ULONG i; + ULONG Sectors; + + /* Allocate buffer */ + Buffer = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + 0, + 64 * 1024); + if (Buffer == NULL) + return(STATUS_INSUFFICIENT_RESOURCES); + + /* Zero the buffer */ + memset(Buffer, 0, 64 * 1024); + + /* FAT cluster 0 */ + Buffer[0] = 0xf8; /* Media type */ + Buffer[1] = 0xff; + Buffer[2] = 0xff; + Buffer[3] = 0x0f; + /* FAT cluster 1 */ + Buffer[4] = 0xff; /* Clean shutdown, no disk read/write errors, end-of-cluster (EOC) mark */ + Buffer[5] = 0xff; + Buffer[6] = 0xff; + Buffer[7] = 0x0f; + + /* Write first sector of the FAT */ + FileOffset.QuadPart = (SectorOffset * 512) + sizeof(FATX_BOOT_SECTOR); + Status = NtWriteFile(FileHandle, + NULL, + NULL, + NULL, + &IoStatusBlock, + Buffer, + 512, + &FileOffset, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtWriteFile() failed (Status %lx)\n", Status); + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + return(Status); + } + + UpdateProgress (Context, 1); + + /* Zero the begin of the buffer */ + memset(Buffer, 0, 8); + + /* Zero the rest of the FAT */ + Sectors = 64 * 1024 / 512; + for (i = 1; i < FATSectors; i += Sectors) + { + /* Zero some sectors of the FAT */ + FileOffset.QuadPart = (SectorOffset + i) * 512 + sizeof(FATX_BOOT_SECTOR); + + if ((FATSectors - i) <= Sectors) + { + Sectors = FATSectors - i; + } + + Status = NtWriteFile(FileHandle, + NULL, + NULL, + NULL, + &IoStatusBlock, + Buffer, + Sectors * 512, + &FileOffset, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtWriteFile() failed (Status %lx)\n", Status); + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + return(Status); + } + + UpdateProgress (Context, Sectors); + } + + /* Free the buffer */ + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + + return(Status); +} + +static NTSTATUS +FatxWriteRootDirectory (IN HANDLE FileHandle, + IN ULONG FATSectors, + IN OUT PFORMAT_CONTEXT Context) +{ + IO_STATUS_BLOCK IoStatusBlock; + NTSTATUS Status = STATUS_SUCCESS; + PUCHAR Buffer; + LARGE_INTEGER FileOffset; + ULONG FirstRootDirSector; + ULONG RootDirSectors; + + /* Write cluster */ + RootDirSectors = 256 * 64 / 512; + FirstRootDirSector = sizeof(FATX_BOOT_SECTOR) / 512 + FATSectors; + + DPRINT("RootDirSectors = %lu\n", RootDirSectors); + DPRINT("FirstRootDirSector = %lu\n", FirstRootDirSector); + + /* Allocate buffer for the cluster */ + Buffer = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + 0, + RootDirSectors * 512); + if (Buffer == NULL) + return(STATUS_INSUFFICIENT_RESOURCES); + + /* Zero the buffer */ + memset(Buffer, 0xff, RootDirSectors * 512); + + /* Zero some sectors of the root directory */ + FileOffset.QuadPart = FirstRootDirSector * 512; + + Status = NtWriteFile(FileHandle, + NULL, + NULL, + NULL, + &IoStatusBlock, + Buffer, + RootDirSectors * 512, + &FileOffset, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtWriteFile() failed (Status %lx)\n", Status); + } + + /* Free the buffer */ + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + + return(Status); +} + + +NTSTATUS +FatxFormat (HANDLE FileHandle, + PPARTITION_INFORMATION PartitionInfo, + PDISK_GEOMETRY DiskGeometry, + BOOLEAN QuickFormat, + PFORMAT_CONTEXT Context) +{ + FATX_BOOT_SECTOR BootSector; + ULONGLONG SectorCount; + ULONG ClusterCount; + ULONG RootDirSectors; + ULONG FATSectors; + + NTSTATUS Status; + + SectorCount = PartitionInfo->PartitionLength.QuadPart >> GetShiftCount(512); /* Use shifting to avoid 64-bit division */ + + memset(&BootSector, 0, sizeof(FATX_BOOT_SECTOR)); + memcpy(&BootSector.SysType[0], "FATX", 4); + BootSector.SectorsPerCluster = 32; + BootSector.FATCount = 1; + BootSector.VolumeID = CalcVolumeSerialNumber(); + RootDirSectors = 256 * 64 / 512; + + /* Calculate number of FAT sectors */ + ClusterCount = SectorCount >> GetShiftCount(32); + + if (ClusterCount > 65525) + { + FATSectors = (((ClusterCount * 4) + 4095) & ~4095) >> GetShiftCount(512); + } + else + { + FATSectors = (((ClusterCount * 2) + 4095) & ~4095) >> GetShiftCount(512); + } + DPRINT("FATSectors = %hu\n", FATSectors); + + /* Init context data */ + if (QuickFormat) + { + Context->TotalSectorCount = + 1 + FATSectors + RootDirSectors; + } + else + { + Context->TotalSectorCount = SectorCount; + } + + Status = FatxWriteBootSector (FileHandle, + &BootSector, + Context); + if (!NT_SUCCESS(Status)) + { + DPRINT("FatxWriteBootSector() failed with status 0x%.08x\n", Status); + return Status; + } + + /* Write first FAT copy */ + if (ClusterCount > 65525) + { + Status = Fatx32WriteFAT (FileHandle, + 0, + FATSectors, + Context); + } + else + { + Status = Fatx16WriteFAT (FileHandle, + 0, + FATSectors, + Context); + } + if (!NT_SUCCESS(Status)) + { + DPRINT("FatxWriteFAT() failed with status 0x%.08x\n", Status); + return Status; + } + + Status = FatxWriteRootDirectory (FileHandle, + FATSectors, + Context); + if (!NT_SUCCESS(Status)) + { + DPRINT("FatxWriteRootDirectory() failed with status 0x%.08x\n", Status); + } + + if (!QuickFormat) + { + /* FIXME: Fill remaining sectors */ + } + + return Status; +} _____ Added: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c --- trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c 2005-01-25 21:16:19 UTC (rev 13285) +++ trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c 2005-01-25 22:10:39 UTC (rev 13286) @@ -0,0 +1,198 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS VFATx filesystem library + * FILE: vfatxlib.c + * PURPOSE: Main API + * PROGRAMMERS: Hartmut Birr + * REVISIONS: + * CSH 05/04-2003 Created + */ +#define NTOS_MODE_USER +#include <ntos.h> +#include <ddk/ntddscsi.h> +#include <fslib/vfatxlib.h> +#include "vfatxlib.h" + +#define NDEBUG +#include <debug.h> + + +NTSTATUS +VfatxInitialize(VOID) +{ + DPRINT("VfatxInitialize()\n"); + + return STATUS_SUCCESS; +} + + +NTSTATUS +VfatxFormat (PUNICODE_STRING DriveRoot, + ULONG MediaFlag, + BOOLEAN QuickFormat, + PFMIFSCALLBACK Callback) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + DISK_GEOMETRY DiskGeometry; + IO_STATUS_BLOCK Iosb; + HANDLE FileHandle; + PARTITION_INFORMATION PartitionInfo; + FORMAT_CONTEXT Context; + NTSTATUS Status; + + DPRINT("VfatxFormat(DriveRoot '%wZ')\n", DriveRoot); + + Context.TotalSectorCount = 0; + Context.CurrentSectorCount = 0; + Context.Callback = Callback; + Context.Success = FALSE; + Context.Percent = 0; + + InitializeObjectAttributes(&ObjectAttributes, + DriveRoot, + 0, + NULL, + NULL); + + Status = NtOpenFile(&FileHandle, + FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES, + &ObjectAttributes, + &Iosb, + FILE_SHARE_READ, + FILE_SYNCHRONOUS_IO_ALERT); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtOpenFile() failed with status 0x%.08x\n", Status); + return Status; + } + + Status = NtDeviceIoControlFile(FileHandle, + NULL, + NULL, + NULL, + &Iosb, + IOCTL_DISK_GET_DRIVE_GEOMETRY, + NULL, + 0, + &DiskGeometry, + sizeof(DISK_GEOMETRY)); + if (!NT_SUCCESS(Status)) + { + DPRINT("IOCTL_DISK_GET_DRIVE_GEOMETRY failed with status 0x%.08x\n", Status); + NtClose(FileHandle); + return Status; + } + + if (DiskGeometry.MediaType == FixedMedia) + { + DPRINT("Cylinders %I64d\n", DiskGeometry.Cylinders.QuadPart); + DPRINT("TracksPerCylinder %ld\n", DiskGeometry.TracksPerCylinder); + DPRINT("SectorsPerTrack %ld\n", DiskGeometry.SectorsPerTrack); + DPRINT("BytesPerSector %ld\n", DiskGeometry.BytesPerSector); + DPRINT("DiskSize %I64d\n", + DiskGeometry.Cylinders.QuadPart * + (ULONGLONG)DiskGeometry.TracksPerCylinder * + (ULONGLONG)DiskGeometry.SectorsPerTrack * + (ULONGLONG)DiskGeometry.BytesPerSector); + + Status = NtDeviceIoControlFile(FileHandle, + NULL, + NULL, + NULL, + &Iosb, + IOCTL_DISK_GET_PARTITION_INFO, + NULL, + 0, + &PartitionInfo, + sizeof(PARTITION_INFORMATION)); + if (!NT_SUCCESS(Status)) + { + DPRINT("IOCTL_DISK_GET_PARTITION_INFO failed with status 0x%.08x\n", Status); + NtClose(FileHandle); + return Status; + } + + /* + * FIXME: This is a hack! + * Partitioning software MUST set the correct number of hidden sectors! + */ + PartitionInfo.HiddenSectors = DiskGeometry.SectorsPerTrack; + } + else + { + PartitionInfo.PartitionType = 0; + PartitionInfo.StartingOffset.QuadPart = 0ULL; + PartitionInfo.PartitionLength.QuadPart = + DiskGeometry.Cylinders.QuadPart * + (ULONGLONG)DiskGeometry.TracksPerCylinder * + (ULONGLONG)DiskGeometry.SectorsPerTrack * + (ULONGLONG)DiskGeometry.BytesPerSector; + PartitionInfo.HiddenSectors = 0; + PartitionInfo.PartitionNumber = 0; + PartitionInfo.BootIndicator = FALSE; + PartitionInfo.RewritePartition = FALSE; + PartitionInfo.RecognizedPartition = FALSE; + } + + DPRINT("PartitionType 0x%x\n", PartitionInfo.PartitionType); + DPRINT("StartingOffset %I64d\n", PartitionInfo.StartingOffset.QuadPart); + DPRINT("PartitionLength %I64d\n", PartitionInfo.PartitionLength.QuadPart); + DPRINT("HiddenSectors %lu\n", PartitionInfo.HiddenSectors); + DPRINT("PartitionNumber %d\n", PartitionInfo.PartitionNumber); + DPRINT("BootIndicator 0x%x\n", PartitionInfo.BootIndicator); + DPRINT("RewritePartition %d\n", PartitionInfo.RewritePartition); + DPRINT("RecognizedPartition %d\n", PartitionInfo.RecognizedPartition); + + if (Callback != NULL) + { + Context.Percent = 0; + Callback (PROGRESS, 0, (PVOID)&Context.Percent); + } + + Status = FatxFormat (FileHandle, + &PartitionInfo, + &DiskGeometry, + QuickFormat, + &Context); + NtClose(FileHandle); + + if (Callback != NULL) + { + Context.Success = (BOOLEAN)(NT_SUCCESS(Status)); + Callback (DONE, 0, (PVOID)&Context.Success); + } + + DPRINT("VfatFormat() done. Status 0x%.08x\n", Status); + + return Status; +} + + +NTSTATUS +VfatxCleanup(VOID) +{ + DPRINT("VfatxCleanup()\n"); + + return STATUS_SUCCESS; +} + + +VOID +VfatxUpdateProgress (PFORMAT_CONTEXT Context, + ULONG Increment) +{ + ULONG NewPercent; + + Context->CurrentSectorCount += (ULONGLONG)Increment; + + + NewPercent = (Context->CurrentSectorCount * 100ULL) / Context->TotalSectorCount; + + if (NewPercent > Context->Percent) + { + Context->Percent = NewPercent; + Context->Callback (PROGRESS, 0, &Context->Percent); + } +} + +/* EOF */ _____ Added: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h --- trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h 2005-01-25 21:16:19 UTC (rev 13285) +++ trunk/reactos/lib/fslib/vfatxlib/vfatxlib.h 2005-01-25 22:10:39 UTC (rev 13286) @@ -0,0 +1,45 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS VFAT filesystem library + * FILE: vfatxlib.h + */ +#define NDEBUG +#include <debug.h> +#define NTOS_MODE_USER +#include <ntos.h> +#include <fslib/vfatlib.h> + +typedef struct _FATX_BOOT_SECTOR +{ + unsigned char SysType[4]; // 0 + unsigned long VolumeID; // 4 + unsigned long SectorsPerCluster; // 8 + unsigned short FATCount; // 12 + unsigned long Unknown; // 14 + unsigned char Unused[4078]; // 18 +} __attribute__((packed)) FATX_BOOT_SECTOR, *PFATX_BOOT_SECTOR; + + +typedef struct _FORMAT_CONTEXT +{ + PFMIFSCALLBACK Callback; + ULONG TotalSectorCount; + ULONG CurrentSectorCount; + BOOLEAN Success; + ULONG Percent; +} FORMAT_CONTEXT, *PFORMAT_CONTEXT; + + + +NTSTATUS +FatxFormat (HANDLE FileHandle, + PPARTITION_INFORMATION PartitionInfo, + PDISK_GEOMETRY DiskGeometry, + BOOLEAN QuickFormat, + PFORMAT_CONTEXT Context); + +VOID +UpdateProgress (PFORMAT_CONTEXT Context, + ULONG Increment); + +/* EOF */
19 years, 11 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
71
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
Results per page:
10
25
50
100
200