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
February 2009
----- 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
29 participants
559 discussions
Start a n
N
ew thread
[jmorlan] 39630: Fix some cases where the "format" program misused the %S format, causing it to display gibberish. To print a TCHAR string with _tprintf, just use %s. (Bug 4067)
by jmorlan@svn.reactos.org
Author: jmorlan Date: Mon Feb 16 17:05:13 2009 New Revision: 39630 URL:
http://svn.reactos.org/svn/reactos?rev=39630&view=rev
Log: Fix some cases where the "format" program misused the %S format, causing it to display gibberish. To print a TCHAR string with _tprintf, just use %s. (Bug 4067) Modified: trunk/reactos/base/system/format/format.c trunk/reactos/base/system/format/lang/bg-BG.rc trunk/reactos/base/system/format/lang/cs-CZ.rc trunk/reactos/base/system/format/lang/de-DE.rc trunk/reactos/base/system/format/lang/el-GR.rc trunk/reactos/base/system/format/lang/en-US.rc trunk/reactos/base/system/format/lang/es-ES.rc trunk/reactos/base/system/format/lang/fr-FR.rc trunk/reactos/base/system/format/lang/hu-HU.rc trunk/reactos/base/system/format/lang/id-ID.rc trunk/reactos/base/system/format/lang/it-IT.rc trunk/reactos/base/system/format/lang/ja-JP.rc trunk/reactos/base/system/format/lang/lt-LT.rc trunk/reactos/base/system/format/lang/no-NO.rc trunk/reactos/base/system/format/lang/pl-PL.rc trunk/reactos/base/system/format/lang/ru-RU.rc trunk/reactos/base/system/format/lang/sk-SK.rc trunk/reactos/base/system/format/lang/uk-UA.rc Modified: trunk/reactos/base/system/format/format.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/format.…
============================================================================== --- trunk/reactos/base/system/format/format.c [iso-8859-1] (original) +++ trunk/reactos/base/system/format/format.c [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -64,7 +64,7 @@ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf, 0, NULL ); - _tprintf(_T("%S: %S\n"), (LPWSTR)Message, (LPWSTR)lpMsgBuf ); + _tprintf(_T("%s: %s\n"), Message, lpMsgBuf ); LocalFree( lpMsgBuf ); } @@ -264,7 +264,7 @@ LoadString( GetModuleHandle(NULL), STRING_HELP, (LPTSTR) szMsg,RC_STRING_MAX_SIZE); if (!LoadFMIFSEntryPoints()) { - _tprintf(szMsg, ProgramName, ""); + _tprintf(szMsg, ProgramName, _T("")); return; } Modified: trunk/reactos/base/system/format/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/bg…
============================================================================== --- trunk/reactos/base/system/format/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/bg-BG.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -7,7 +7,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Óïîòðåáà: %S óñòðîéñòâî: [-FS:ôàéëîâà_ñèñòåìà] [-V:åòèêåò] [-Q] [-A:ðàçìåð] [-C]\n\n\ +STRING_HELP, "Óïîòðåáà: %s óñòðîéñòâî: [-FS:ôàéëîâà_ñèñòåìà] [-V:åòèêåò] [-Q] [-A:ðàçìåð] [-C]\n\n\ [drive:] Óêàçâà óñòðîéñòâîòî çà îðàçìåðÿâàíå.\n\ -FS:ôàéëîâà_ñèñòåìà Óêàçâà âèäà íà äàéëîâàòà ñèñòåìà (%s).\n\ -V:åòèêåò Óêàçâà åòèêåò çà òîìà.\n\ @@ -29,7 +29,7 @@ STRING_FMIFS_FAIL "Íåóñïåøíî îïðåäåëÿíå ðàçïîëîæåíèåòî íà âõîäíèòå òî÷êè íà FMIFS\n\n" -STRING_UNKNOW_ARG "Íåèçâåñòåí êëþ÷: %S\n" +STRING_UNKNOW_ARG "Íåèçâåñòåí êëþ÷: %s\n" STRING_DRIVE_PARM "Çàäúëæèòåëíèÿò êëþ÷ çà èìåòî íà óñòðîéñòâîòî ëèïñâà.\n\n" @@ -41,7 +41,7 @@ STRING_NO_VOLUME_SIZE "Íåóñïåøíî îïðåäåëÿíå íà ðàçìåðà íà òîìà" -STRING_FILESYSTEM "ÂÈä íà ôàéëîâàòà ñèñòåìà: %S.\n" +STRING_FILESYSTEM "ÂÈä íà ôàéëîâàòà ñèñòåìà: %s.\n" STRING_LABEL_NAME_EDIT "Âúâåäåòå ñåãàøíèÿ åòèêåò íà óñòðîéñòâî %C: " Modified: trunk/reactos/base/system/format/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/cs…
============================================================================== --- trunk/reactos/base/system/format/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/cs-CZ.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -12,7 +12,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Pouití: %S jednotka: [-FS:filesystem] [-V:jmenovka] [-Q] [-A:velikost] [-C]\n\n\ +STRING_HELP, "Pouití: %s jednotka: [-FS:filesystem] [-V:jmenovka] [-Q] [-A:velikost] [-C]\n\n\ [jednotka:] Urèí jednotku, která bude zformátována.\n\ -FS:typfs Urèí typ souborového systému (%s).\n\ -V:jmenovka Urèí jmenovku svazku.\n\ @@ -33,7 +33,7 @@ STRING_FMIFS_FAIL "Nelze najít vstupní body FMIFS.\n\n" -STRING_UNKNOW_ARG "Neznámý agrument: %S\n" +STRING_UNKNOW_ARG "Neznámý agrument: %s\n" STRING_DRIVE_PARM "Schází nutný parametr disku.\n\n" @@ -45,7 +45,7 @@ STRING_NO_VOLUME_SIZE "Nelze zjistit velikost svazku" -STRING_FILESYSTEM "Souborový systém je typu %S.\n" +STRING_FILESYSTEM "Souborový systém je typu %s.\n" STRING_LABEL_NAME_EDIT "Vlote nynìjí jmenovku svazku pro jednotku %C: " Modified: trunk/reactos/base/system/format/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/de…
============================================================================== --- trunk/reactos/base/system/format/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/de-DE.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -12,7 +12,7 @@ -STRING_HELP, "Syntax: %S Datenträger: [-FS:Dateisystem] [-V:Label] [-Q] [-A:Größe] [-C]\n\n\ +STRING_HELP, "Syntax: %s Datenträger: [-FS:Dateisystem] [-V:Label] [-Q] [-A:Größe] [-C]\n\n\ [Datenträger:] Legt das zu formatierende Laufwerk fest.\n\ -FS:Dateisystem Legt das Dateisystem fest (%s).\n\ -V:Label Legt den Datenträgernamen fest.\n\ @@ -34,7 +34,7 @@ STRING_FMIFS_FAIL "Kann FMIFS-Eingangspunkte nicht lokalisieren.\n\n" -STRING_UNKNOW_ARG "Unbekanntes Argument: %S\n" +STRING_UNKNOW_ARG "Unbekanntes Argument: %s\n" STRING_DRIVE_PARM "Benötigter Laufwerksparameter fehlt.\n\n" @@ -46,7 +46,7 @@ STRING_NO_VOLUME_SIZE "Kann Mediumsgröße nicht abfragen" -STRING_FILESYSTEM "Der Typ des Dateisystems ist %S.\n" +STRING_FILESYSTEM "Der Typ des Dateisystems ist %s.\n" STRING_LABEL_NAME_EDIT "Geben Sie die aktuelle Datenträgerbezeichnung für Datenträger %C: ein" Modified: trunk/reactos/base/system/format/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/el…
============================================================================== --- trunk/reactos/base/system/format/lang/el-GR.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/el-GR.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -7,7 +7,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "×ñÞóç: %S ôüìïò: [-FS:óýóôçìá-áñ÷åßùí] [-V:åôéêÝôá] [-Q] [-A:ìÝãåèïò] [-C]\n\n\ +STRING_HELP, "×ñÞóç: %s ôüìïò: [-FS:óýóôçìá-áñ÷åßùí] [-V:åôéêÝôá] [-Q] [-A:ìÝãåèïò] [-C]\n\n\ [ôüìïò:] Êáèïñßæåé ôï ãñÜììá ìïíÜäáò äßóêïõ ðñïò äéáìüñöùóç.\n\ -FS:óýóôçìá-áñ÷åßùí Êáèïñßæåé ôïí ôýðï ôïõ óõóôÞìáôïò áñ÷åßùí FAT, FAT32 Þ NTFS (%s).\n\ -V:label Êáèïñéóìüò ôçò åôéêÝôáò ôïõ ôüìïõ.\n\ @@ -31,7 +31,7 @@ STRING_FMIFS_FAIL "Could not located FMIFS entry points.\n\n" -STRING_UNKNOW_ARG "¢ãíùóôï üñéóìá: %S\n" +STRING_UNKNOW_ARG "¢ãíùóôï üñéóìá: %s\n" STRING_DRIVE_PARM "Required drive parameter is missing.\n\n" @@ -43,7 +43,7 @@ STRING_NO_VOLUME_SIZE "Could not query volume size" -STRING_FILESYSTEM "Ï ôýðïò ôïõ óõóôÞìáôïò áñ÷åßùí åßíáé %S.\n" +STRING_FILESYSTEM "Ï ôýðïò ôïõ óõóôÞìáôïò áñ÷åßùí åßíáé %s.\n" STRING_LABEL_NAME_EDIT "ÅéóÜãåôå ôçí ôñÝ÷ïõóá åôéêÝôá ãéá ôïí ôüìï %C: " Modified: trunk/reactos/base/system/format/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/en…
============================================================================== --- trunk/reactos/base/system/format/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/en-US.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -7,7 +7,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Usage: %S drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ +STRING_HELP, "Usage: %s drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ [drive:] Specifies the drive to format.\n\ -FS:file-system Specifies the type of file system (%s).\n\ -V:label Specifies volume label.\n\ @@ -29,7 +29,7 @@ STRING_FMIFS_FAIL "Could not located FMIFS entry points.\n\n" -STRING_UNKNOW_ARG "Unknown argument: %S\n" +STRING_UNKNOW_ARG "Unknown argument: %s\n" STRING_DRIVE_PARM "Required drive parameter is missing.\n\n" @@ -41,7 +41,7 @@ STRING_NO_VOLUME_SIZE "Could not query volume size" -STRING_FILESYSTEM "The type of the file system is %S.\n" +STRING_FILESYSTEM "The type of the file system is %s.\n" STRING_LABEL_NAME_EDIT "Enter current volume label for drive %C: " Modified: trunk/reactos/base/system/format/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/es…
============================================================================== --- trunk/reactos/base/system/format/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/es-ES.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -7,7 +7,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Uso: %S unidad: [-FS:sistema de archivos] [-V:etiqueta] [-Q] [-A:tamaño] [-C]\n\n\ +STRING_HELP, "Uso: %s unidad: [-FS:sistema de archivos] [-V:etiqueta] [-Q] [-A:tamaño] [-C]\n\n\ [unidad:] Especifica la unidad a formatear.\n\ -FS:sistema de archivos Especifica el sistema de archivos (%s).\n\ -V:etiqueta Especifica la etiqueta del volumen.\n\ @@ -29,7 +29,7 @@ STRING_FMIFS_FAIL "Imposible localizar puntos de entrada FMIFS.\n\n" -STRING_UNKNOW_ARG "Argumento desconocido: %S\n" +STRING_UNKNOW_ARG "Argumento desconocido: %s\n" STRING_DRIVE_PARM "Parámetro de unidad requerido no encontrado.\n\n" @@ -41,7 +41,7 @@ STRING_NO_VOLUME_SIZE "Imposible consultar el tamaño de volumen" -STRING_FILESYSTEM "El tipo del Sistema de archivos es %S.\n" +STRING_FILESYSTEM "El tipo del Sistema de archivos es %s.\n" STRING_LABEL_NAME_EDIT "Introduzca la etiqueta del volumen para la unidad %C: " Modified: trunk/reactos/base/system/format/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/fr…
============================================================================== --- trunk/reactos/base/system/format/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/fr-FR.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -11,7 +11,7 @@ STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Utilisation : %S disque: [-FS:système de fichier] [-V:nom] [-Q] [-A:taille] [-C]\n\n\ +STRING_HELP, "Utilisation : %s disque: [-FS:système de fichier] [-V:nom] [-Q] [-A:taille] [-C]\n\n\ [disque:] Indique le disque à formater.\n\ -FS:système de fichier Indique le type de système de fichier (%s).\n\ -V:nom Détermine le nom du disque.\n\ @@ -31,7 +31,7 @@ STRING_FMIFS_FAIL "Impossible de trouver les points d'entrée FMIFS.\n\n" -STRING_UNKNOW_ARG "Argument inconnu : %S\n" +STRING_UNKNOW_ARG "Argument inconnu : %s\n" STRING_DRIVE_PARM "Le disque à formater n'est pas indiqué.\n\n" @@ -43,7 +43,7 @@ STRING_NO_VOLUME_SIZE "Impossible de déterminer la taille du disque" -STRING_FILESYSTEM "Le type de système de fichier est %S.\n" +STRING_FILESYSTEM "Le type de système de fichier est %s.\n" STRING_LABEL_NAME_EDIT "Donner un nom pour le disque %C : " Modified: trunk/reactos/base/system/format/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/hu…
============================================================================== --- trunk/reactos/base/system/format/lang/hu-HU.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/hu-HU.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -8,7 +8,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Használat: %S kötet: [-FS:állományrendszer] [-V:címke] [-Q] [-A:méret] [-C]\n\n\ +STRING_HELP, "Használat: %s kötet: [-FS:állományrendszer] [-V:címke] [-Q] [-A:méret] [-C]\n\n\ [kötet:] A meghajtóbetûjelet adja meg (kettõsponttal a végén).\n\ -FS:állományrendszer Az állományrendszer típusát adja meg (%s).\n\ -V:címke A Kötetcímke neve.\n\ @@ -33,7 +33,7 @@ STRING_FMIFS_FAIL "Nem találtam meg az FMIFS kezdõpontját.\n\n" -STRING_UNKNOW_ARG "Érvénytelen paraméter: %S\n" +STRING_UNKNOW_ARG "Érvénytelen paraméter: %s\n" STRING_DRIVE_PARM "Hiányzik a meghajtó meghatározás.\n\n" @@ -45,7 +45,7 @@ STRING_NO_VOLUME_SIZE "Nem sikerült megállapítani a kötet méretét" -STRING_FILESYSTEM "A állományrendszer típusa %S.\n" +STRING_FILESYSTEM "A állományrendszer típusa %s.\n" STRING_LABEL_NAME_EDIT "Adja meg a címkét az alábbi meghajtóhoz: %C: " Modified: trunk/reactos/base/system/format/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/id…
============================================================================== --- trunk/reactos/base/system/format/lang/id-ID.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/id-ID.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -4,7 +4,7 @@ STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Pemakaian: %S drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ +STRING_HELP, "Pemakaian: %s drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ [drive:] Menetapkan drive yang akan diformat.\n\ -FS:file-system Menetapkan tipe sistem file (%s).\n\ -V:label Menetapkan label volume.\n\ @@ -26,7 +26,7 @@ STRING_FMIFS_FAIL "Tidak bisa menemukan FMIFS entry points.\n\n" -STRING_UNKNOW_ARG "Argumen tidak dikenal: %S\n" +STRING_UNKNOW_ARG "Argumen tidak dikenal: %s\n" STRING_DRIVE_PARM "Parameter drive yang diperlukan kurang.\n\n" @@ -38,7 +38,7 @@ STRING_NO_VOLUME_SIZE "Tidak bisa mendapatkan ukuran volume" -STRING_FILESYSTEM "Tipe sistem file adalah %S.\n" +STRING_FILESYSTEM "Tipe sistem file adalah %s.\n" STRING_LABEL_NAME_EDIT "Masukkan label volume saat ini untuk drive %C: " Modified: trunk/reactos/base/system/format/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/it…
============================================================================== --- trunk/reactos/base/system/format/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/it-IT.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -9,7 +9,7 @@ STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Uso: %S drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ +STRING_HELP, "Uso: %s drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ [drive:] Specifica l'unità disco da formattare.\n\ -FS:file-system Specifica il tipo di filesystem (%s).\n\ -V:label Specifica l'etichetta del volume.\n\ @@ -30,7 +30,7 @@ STRING_FMIFS_FAIL "Impossibile trovare 'FMIFS entry points'.\n\n" -STRING_UNKNOW_ARG "Parametro sconosciuto: %S\n" +STRING_UNKNOW_ARG "Parametro sconosciuto: %s\n" STRING_DRIVE_PARM "Manca il parametro 'drive'.\n\n" @@ -42,7 +42,7 @@ STRING_NO_VOLUME_SIZE "Impossibile rilevare la dimensione del volume" -STRING_FILESYSTEM "Il tipo di file system è %S.\n" +STRING_FILESYSTEM "Il tipo di file system è %s.\n" STRING_LABEL_NAME_EDIT "Inserire l'etichetta attuale del volume del drive %C: " Modified: trunk/reactos/base/system/format/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/ja…
============================================================================== --- trunk/reactos/base/system/format/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/ja-JP.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -7,7 +7,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "gp@: %S hCu: [-FS:t@CVXe] [-V:x] [-Q] [-A:TCY] [-C]\n\n\ +STRING_HELP, "gp@: %s hCu: [-FS:t@CVXe] [-V:x] [-Q] [-A:TCY] [-C]\n\n\ [hCu:] tH[}bg·éhCuðwèµÜ·B\n\ -FS:t@CVXe\n\ t@CVXeÌíÞðwèµÜ· (%s)B\n\ @@ -32,7 +32,7 @@ STRING_FMIFS_FAIL "FMIFS Gg |Cg ðÝèūܹñŵ½B\n\n" -STRING_UNKNOW_ARG "s¾Èø: %S\n" +STRING_UNKNOW_ARG "s¾Èø: %s\n" STRING_DRIVE_PARM "KvÈhCuðwè·ép[^ªs«µÄ¢Ü·B\n\n" @@ -44,7 +44,7 @@ STRING_NO_VOLUME_SIZE "{ [ TCYÌâ¢í¹ªÅ«Ü¹ñŵ½" -STRING_FILESYSTEM "t@CVXeÌ^CvÍ %S Å·B\n" +STRING_FILESYSTEM "t@CVXeÌ^CvÍ %s Å·B\n" STRING_LABEL_NAME_EDIT "hCu D: Ì»ÝÌ{ [ xðü͵ľ³¢ " Modified: trunk/reactos/base/system/format/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/lt…
============================================================================== --- trunk/reactos/base/system/format/lang/lt-LT.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/lt-LT.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -5,7 +5,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Naudojimas: %S diskas: [-FS:bylø-sistema] [-V:þymë] [-Q] [-A:dydis] [-C]\n\n\ +STRING_HELP, "Naudojimas: %s diskas: [-FS:bylø-sistema] [-V:þymë] [-Q] [-A:dydis] [-C]\n\n\ [diskas:] Nurodo diskà formavimui.\n\ -FS:bylø-sistema Nurodo bylø sistemos tipà (%s).\n\ -V:þymë Nurodo tomo þymæ.\n\ @@ -26,7 +26,7 @@ STRING_FMIFS_FAIL "Nepavyko rasti FMIFS áëjimo taðkø.\n\n" -STRING_UNKNOW_ARG "Neþinomas parametras: %S\n" +STRING_UNKNOW_ARG "Neþinomas parametras: %s\n" STRING_DRIVE_PARM "Trûksta reikiamo disko parametro.\n\n" @@ -38,7 +38,7 @@ STRING_NO_VOLUME_SIZE "Nepavyko nustatyti tomo dydþio" -STRING_FILESYSTEM "Bylø sistemos tipas yra %S.\n" +STRING_FILESYSTEM "Bylø sistemos tipas yra %s.\n" STRING_LABEL_NAME_EDIT "Áveskite dabartinæ tomo þymæ diskui %C: " Modified: trunk/reactos/base/system/format/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/no…
============================================================================== --- trunk/reactos/base/system/format/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/no-NO.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -7,7 +7,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "bruk: %S stasjon: [-FS:fil-system] [-V:merke] [-Q] [-A:størrelse] [-C]\n\n\ +STRING_HELP, "bruk: %s stasjon: [-FS:fil-system] [-V:merke] [-Q] [-A:størrelse] [-C]\n\n\ [stasjon:] Spesifisere stasjon til formater.\n\ -FS:file-system Spesifisere typen av fil system (%s).\n\ -V:merke Spesifisere volum merke.\n\ @@ -29,7 +29,7 @@ STRING_FMIFS_FAIL "Kunne ikke befinne seg FMIFS artikkel momenter.\n\n" -STRING_UNKNOW_ARG "Ukjent argument: %S\n" +STRING_UNKNOW_ARG "Ukjent argument: %s\n" STRING_DRIVE_PARM "Obligatorisk drive parameter er mistet.\n\n" @@ -41,7 +41,7 @@ STRING_NO_VOLUME_SIZE "Kunne ikke spørre om volumet størrelse" -STRING_FILESYSTEM "Typen av filsystem er %S.\n" +STRING_FILESYSTEM "Typen av filsystem er %s.\n" STRING_LABEL_NAME_EDIT "Velg aktuell volum merke for stasjon %C: " Modified: trunk/reactos/base/system/format/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/pl…
============================================================================== --- trunk/reactos/base/system/format/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/pl-PL.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Sposób u¿ycia: %S wolumin: [-FS:syst-plik] [-V:etykieta] [-Q] [-A:rozmiar] [-C]\n\n\ +STRING_HELP, "Sposób u¿ycia: %s wolumin: [-FS:syst-plik] [-V:etykieta] [-Q] [-A:rozmiar] [-C]\n\n\ [wolumin:] Okrela literê dysku przeznaczonego do formatowania.\n\ -FS:syst-plik Okrela rodzaj systemu plików (%s).\n\ -V:etykieta Okrela etykietê woluminu.\n\ @@ -32,7 +32,7 @@ STRING_FMIFS_FAIL "Nie mo¿na zlokalizowaæ punktów wejciowych FMIFS.\n\n" -STRING_UNKNOW_ARG "Nieprawid³owy parametr: %S\n" +STRING_UNKNOW_ARG "Nieprawid³owy parametr: %s\n" STRING_DRIVE_PARM "Brakuj¹cy wymagany parametr dysku.\n\n" @@ -44,7 +44,7 @@ STRING_NO_VOLUME_SIZE "Nie mo¿na odczytaæ rozmiaru woluminu" -STRING_FILESYSTEM "Rodzaj systemu plików to %S.\n" +STRING_FILESYSTEM "Rodzaj systemu plików to %s.\n" STRING_LABEL_NAME_EDIT "Podaj aktualn¹ etykietê woluminu dla dysku %C: " Modified: trunk/reactos/base/system/format/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/ru…
============================================================================== --- trunk/reactos/base/system/format/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/ru-RU.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -5,7 +5,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Èñïîëüçîâàíèå: %S òîì: [-FS:ñèñòåìà] [-V:ìåòêà] [-Q] [-A:ðàçìåð] [-C]\n\n\ +STRING_HELP, "Èñïîëüçîâàíèå: %s òîì: [-FS:ñèñòåìà] [-V:ìåòêà] [-Q] [-A:ðàçìåð] [-C]\n\n\ [òîì:] Óêàçûâàåò áóêâó äèñêà (ñ ïîñëåäóþùèì äâîåòî÷èåì),\n\ òî÷êó ïîäêëþ÷åíèÿ èëè èìÿ òîìà.\n\ -FS:ñèñòåìà Óêàçûâàåò íà òèï ôàéëîâîé ñèñòåìû (%s).\n\ @@ -27,7 +27,7 @@ STRING_FMIFS_FAIL "Íåâîçìîæíî îïðåäåëèòü ðàñïîëîæåíèå òî÷åê âõîäà FMIFS.\n\n" -STRING_UNKNOW_ARG "Íåïðàâèëüíûå àðãóìåíòû: %S\n" +STRING_UNKNOW_ARG "Íåïðàâèëüíûå àðãóìåíòû: %s\n" STRING_DRIVE_PARM "Òðåáóåìûé ïàðàìåòð îïåðàöèè îòñóòñòâóåò.\n\n" @@ -39,7 +39,7 @@ STRING_NO_VOLUME_SIZE "Íå óäàëîñü îïðåäåëèòü ðàçìåð òîìà" -STRING_FILESYSTEM "Òèï ôàéëîâîé ñèñòåìû %S.\n" +STRING_FILESYSTEM "Òèï ôàéëîâîé ñèñòåìû %s.\n" STRING_LABEL_NAME_EDIT "Ââåäèòå òåêóùóþ ìåòêó òîìà %C: " Modified: trunk/reactos/base/system/format/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/sk…
============================================================================== --- trunk/reactos/base/system/format/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/sk-SK.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -9,7 +9,7 @@ STRINGTABLE DISCARDABLE BEGIN /* menovka zvzku = volume label, drive = jednotka */ -STRING_HELP, "Pou§itie: %S jednotka: [-FS:systm s£borov] [-V:menovka] [-Q] [-A:vekos] [-C]\n\n\ +STRING_HELP, "Pou§itie: %s jednotka: [-FS:systm s£borov] [-V:menovka] [-Q] [-A:vekos] [-C]\n\n\ [jednotka:] Uruje jednotku k naform tovaniu.\n\ -FS:systm s£borov Uruje typ s£borovho systmu (%s).\n\ -V:menovka Uruje menovku zvzku.\n\ @@ -31,7 +31,7 @@ STRING_FMIFS_FAIL "Could not located FMIFS entry points.\n\n" -STRING_UNKNOW_ARG "Nezn my argument: %S\n" +STRING_UNKNOW_ARG "Nezn my argument: %s\n" STRING_DRIVE_PARM "Chìba nevyhnutnì parameter jednotky.\n\n" @@ -43,7 +43,7 @@ STRING_NO_VOLUME_SIZE "Could not query volume size" -STRING_FILESYSTEM "Typ systmu s£borov je %S.\n" +STRING_FILESYSTEM "Typ systmu s£borov je %s.\n" STRING_LABEL_NAME_EDIT "Vlo§te s£asn£ menovku zvzku pre jednotku %C: " Modified: trunk/reactos/base/system/format/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/uk…
============================================================================== --- trunk/reactos/base/system/format/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/format/lang/uk-UA.rc [iso-8859-1] Mon Feb 16 17:05:13 2009 @@ -11,7 +11,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Âèêîðèñòàííÿ: %S ïðèñòð³é: [-FS:ôàéë-ñèñòåìà] [-V:ì³òêà] [-Q] [-A:ðîçì³ð] [-C]\n\n\ +STRING_HELP, "Âèêîðèñòàííÿ: %s ïðèñòð³é: [-FS:ôàéë-ñèñòåìà] [-V:ì³òêà] [-Q] [-A:ðîçì³ð] [-C]\n\n\ [ïðèñòð³é:] Âêàçóº äèñê, ÿêèé ñë³ä â³äôîðìàòóâàòè (äâîêðàïêà îáîâ'ÿçêîâà).\n\ -FS:ôàéë-ñèñòåìà Âèçíà÷ຠòèï ôàéëîâî¿ ñèñòåìè (%s).\n\ -V:ì³òêà Âèçíà÷ຠêîðîòêó íàçâó äèñêó.\n\ @@ -32,7 +32,7 @@ STRING_FMIFS_FAIL "Íå çì³ã çíàöòè FMIFS òî÷êè âõîäó.\n\n" -STRING_UNKNOW_ARG "Íåâ³äîìèé àðãóìåíò: %S\n" +STRING_UNKNOW_ARG "Íåâ³äîìèé àðãóìåíò: %s\n" STRING_DRIVE_PARM "Íåîáõ³äíèé ïàðàìåòð îïåðàö³¿ â³äñóòí³é.\n\n" @@ -44,7 +44,7 @@ STRING_NO_VOLUME_SIZE "Íå âäàëîñÿ âèçíà÷èòè ðîçì³ð äèñêó" -STRING_FILESYSTEM "Âèçíà÷åíà ôàéëîâà ñèñòåìà %S.\n" +STRING_FILESYSTEM "Âèçíà÷åíà ôàéëîâà ñèñòåìà %s.\n" STRING_LABEL_NAME_EDIT "Âèçíà÷òå ì³òêó äèñêó %C: "
15 years, 10 months
1
0
0
0
[tkreuzer] 39629: gdiobj.c: go back from intrinsics to to portable interlocked functions. InterlockedPopFreeEntry: Use InterlockedIncrement instead of InterlockedCompareExchange when exchanging the next unused entry in the handle table. Lock the free entry before accessing it, fixing a race condition. Might fix bug #4115 See issue #4115 for more details.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Feb 16 17:00:15 2009 New Revision: 39629 URL:
http://svn.reactos.org/svn/reactos?rev=39629&view=rev
Log: gdiobj.c: go back from intrinsics to to portable interlocked functions. InterlockedPopFreeEntry: Use InterlockedIncrement instead of InterlockedCompareExchange when exchanging the next unused entry in the handle table. Lock the free entry before accessing it, fixing a race condition. Might fix bug #4115 See issue #4115 for more details. Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Mon Feb 16 17:00:15 2009 @@ -198,36 +198,64 @@ FASTCALL InterlockedPopFreeEntry() { - ULONG idxFirstFree, idxNextFree, idxPrev; - PGDI_TABLE_ENTRY pFreeEntry; + ULONG idxFirst, idxNext, idxPrev; + PGDI_TABLE_ENTRY pEntry; + DWORD PrevProcId; DPRINT("Enter InterLockedPopFreeEntry\n"); - do - { - idxFirstFree = GdiHandleTable->FirstFree; - if (idxFirstFree) - { - pFreeEntry = GdiHandleTable->Entries + idxFirstFree; - ASSERT(((ULONG)pFreeEntry->KernelData & ~GDI_HANDLE_INDEX_MASK) == 0); - idxNextFree = (ULONG)pFreeEntry->KernelData; - idxPrev = (ULONG)_InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree, idxNextFree, idxFirstFree); - } - else - { - idxFirstFree = GdiHandleTable->FirstUnused; - idxNextFree = idxFirstFree + 1; - if (idxNextFree >= GDI_HANDLE_COUNT) + while (TRUE) + { + idxFirst = GdiHandleTable->FirstFree; + + if (!idxFirst) + { + /* Increment FirstUnused and get the new index */ + idxFirst = InterlockedIncrement((LONG*)&GdiHandleTable->FirstUnused) - 1; + + /* Check if we have entries left */ + if (idxFirst >= GDI_HANDLE_COUNT) { DPRINT1("No more gdi handles left!\n"); return 0; } - idxPrev = (ULONG)_InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstUnused, idxNextFree, idxFirstFree); - } - } - while (idxPrev != idxFirstFree); - - return idxFirstFree; + + /* Return the old index */ + return idxFirst; + } + + /* Get a pointer to the first free entry */ + pEntry = GdiHandleTable->Entries + idxFirst; + + /* Try to lock the entry */ + PrevProcId = InterlockedCompareExchange((LONG*)&pEntry->ProcessId, 1, 0); + if (PrevProcId != 0) + { + /* The entry was locked or not free, wait and start over */ + DelayExecution(); + continue; + } + + /* Sanity check: is entry really free? */ + ASSERT(((ULONG_PTR)pEntry->KernelData & ~GDI_HANDLE_INDEX_MASK) == 0); + + /* Try to exchange the FirstFree value */ + idxNext = (ULONG_PTR)pEntry->KernelData; + idxPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree, + idxNext, + idxFirst); + + /* Unlock the free entry */ + (void)InterlockedExchange((LONG*)&pEntry->ProcessId, 0); + + /* If we succeeded, break out of the loop */ + if (idxPrev == idxFirst) + { + break; + } + } + + return idxFirst; } /* Pushes an entry of the handle table to the free list, @@ -249,9 +277,11 @@ do { idxFirstFree = GdiHandleTable->FirstFree; - pFreeEntry->KernelData = (PVOID)idxFirstFree; - - idxPrev = (ULONG)_InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree, idxToFree, idxFirstFree); + pFreeEntry->KernelData = (PVOID)(ULONG_PTR)idxFirstFree; + + idxPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree, + idxToFree, + idxFirstFree); } while (idxPrev != idxFirstFree); } @@ -365,7 +395,7 @@ Entry = &GdiHandleTable->Entries[Index]; LockHandle: - PrevProcId = _InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, 0); + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, 0); if (PrevProcId == NULL) { PW32THREAD Thread = (PW32THREAD)PsGetCurrentThreadWin32Thread(); @@ -390,13 +420,13 @@ newObject->Tid = Thread; /* unlock the entry */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, CurrentProcessId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, CurrentProcessId); GDIDBG_CAPTUREALLOCATOR(Index); if (W32Process != NULL) { - _InterlockedIncrement(&W32Process->GDIObjects); + InterlockedIncrement(&W32Process->GDIObjects); } DPRINT("GDIOBJ_AllocObj: 0x%x ob: 0x%x\n", Handle, newObject); @@ -496,7 +526,7 @@ LockHandle: /* lock the object, we must not delete global objects, so don't exchange the locking process ID to zero when attempting to lock a global object... */ - PrevProcId = _InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId); + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId); if (PrevProcId == ProcessId) { if ( (Entry->KernelData != NULL) && @@ -516,7 +546,7 @@ Entry->Type = (Entry->Type + GDI_ENTRY_REUSE_INC) & ~GDI_ENTRY_BASETYPE_MASK; /* unlock the handle slot */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, NULL); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, NULL); /* push this entry to the free list */ InterlockedPushFreeEntry(GDI_ENTRY_TO_INDEX(GdiHandleTable, Entry)); @@ -525,7 +555,7 @@ if (W32Process != NULL) { - _InterlockedDecrement(&W32Process->GDIObjects); + InterlockedDecrement(&W32Process->GDIObjects); } /* call the cleanup routine. */ @@ -546,7 +576,7 @@ DPRINT1("Object->cExclusiveLock = %d\n", Object->cExclusiveLock); GDIDBG_TRACECALLER(); GDIDBG_TRACELOCKER(GDI_HANDLE_GET_INDEX(hObj)); - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); /* do not assert here for it will call again from dxg.sys it being call twice */ //ASSERT(FALSE); } @@ -554,7 +584,7 @@ else { LockErrorDebugOutput(hObj, Entry, "GDIOBJ_FreeObj"); - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); } } else if (PrevProcId == LockedProcessId) @@ -791,7 +821,7 @@ { /* Lock the handle table entry. */ LockedProcessId = (HANDLE)((ULONG_PTR)HandleProcessId | 0x1); - PrevProcId = _InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, HandleProcessId); @@ -819,12 +849,12 @@ if (Object->Tid != Thread) { /* Unlock the handle table entry. */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); DelayExecution(); continue; } - _InterlockedIncrement((PLONG)&Object->cExclusiveLock); + InterlockedIncrement((PLONG)&Object->cExclusiveLock); } } else @@ -837,7 +867,7 @@ } /* Unlock the handle table entry. */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); break; } @@ -924,7 +954,7 @@ { /* Lock the handle table entry. */ LockedProcessId = (HANDLE)((ULONG_PTR)HandleProcessId | 0x1); - PrevProcId = _InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, HandleProcessId); @@ -941,13 +971,13 @@ Object = (POBJ)Entry->KernelData; #ifdef GDI_DEBUG - if (_InterlockedIncrement((PLONG)&Object->ulShareCount) == 1) + if (InterlockedIncrement((PLONG)&Object->ulShareCount) == 1) { memset(GDIHandleLocker[HandleIndex], 0x00, GDI_STACK_LEVELS * sizeof(ULONG)); RtlCaptureStackBackTrace(1, GDI_STACK_LEVELS, (PVOID*)GDIHandleLocker[HandleIndex], NULL); } #else - _InterlockedIncrement((PLONG)&Object->ulShareCount); + InterlockedIncrement((PLONG)&Object->ulShareCount); #endif } else @@ -960,7 +990,7 @@ } /* Unlock the handle table entry. */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); break; } @@ -990,7 +1020,7 @@ VOID INTERNAL_CALL GDIOBJ_UnlockObjByPtr(POBJ Object) { - if (_InterlockedDecrement((PLONG)&Object->cExclusiveLock) < 0) + if (InterlockedDecrement((PLONG)&Object->cExclusiveLock) < 0) { DPRINT1("Trying to unlock non-existant object\n"); } @@ -999,7 +1029,7 @@ VOID INTERNAL_CALL GDIOBJ_ShareUnlockObjByPtr(POBJ Object) { - if (_InterlockedDecrement((PLONG)&Object->ulShareCount) < 0) + if (InterlockedDecrement((PLONG)&Object->ulShareCount) < 0) { DPRINT1("Trying to unlock non-existant object\n"); } @@ -1059,7 +1089,7 @@ LockHandle: /* lock the object, we must not convert stock objects, so don't check!!! */ - PrevProcId = _InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId); + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, LockedProcessId, ProcessId); if (PrevProcId == ProcessId) { LONG NewType, PrevType, OldType; @@ -1079,7 +1109,7 @@ NewType = OldType | GDI_ENTRY_STOCK_MASK; /* Try to exchange the type field - but only if the old (previous type) matches! */ - PrevType = _InterlockedCompareExchange(&Entry->Type, NewType, OldType); + PrevType = InterlockedCompareExchange(&Entry->Type, NewType, OldType); if (PrevType == OldType && Entry->KernelData != NULL) { PW32THREAD PrevThread; @@ -1108,7 +1138,7 @@ W32Process = (PW32PROCESS)OldProcess->Win32Process; if (W32Process != NULL) { - _InterlockedDecrement(&W32Process->GDIObjects); + InterlockedDecrement(&W32Process->GDIObjects); } ObDereferenceObject(OldProcess); } @@ -1119,7 +1149,7 @@ Object->hHmgr = hObj; /* remove the process id lock and make it global */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, GDI_GLOBAL_PROCESS); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, GDI_GLOBAL_PROCESS); /* we're done, successfully converted the object */ return TRUE; @@ -1131,7 +1161,7 @@ /* WTF?! The object is already locked by a different thread! Release the lock, wait a bit and try again! FIXME - we should give up after some time unless we want to wait forever! */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); DelayExecution(); goto LockHandle; @@ -1185,7 +1215,7 @@ LockHandle: /* lock the object, we must not convert stock objects, so don't check!!! */ - PrevProcId = _InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, ProcessId, LockedProcessId); + PrevProcId = InterlockedCompareExchangePointer((PVOID*)&Entry->ProcessId, ProcessId, LockedProcessId); if (PrevProcId == ProcessId) { PW32THREAD PrevThread; @@ -1211,7 +1241,7 @@ W32Process = (PW32PROCESS)OldProcess->Win32Process; if (W32Process != NULL) { - _InterlockedDecrement(&W32Process->GDIObjects); + InterlockedDecrement(&W32Process->GDIObjects); } ObDereferenceObject(OldProcess); } @@ -1225,14 +1255,14 @@ W32Process = (PW32PROCESS)NewOwner->Win32Process; if (W32Process != NULL) { - _InterlockedIncrement(&W32Process->GDIObjects); + InterlockedIncrement(&W32Process->GDIObjects); } } else ProcessId = 0; /* remove the process id lock and change it to the new process id */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, ProcessId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, ProcessId); /* we're done! */ return Ret; @@ -1247,7 +1277,7 @@ being deleted in the meantime (because we don't have aquired a reference at this point). FIXME - we should give up after some time unless we want to wait forever! */ - (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); + (void)InterlockedExchangePointer((PVOID*)&Entry->ProcessId, PrevProcId); DelayExecution(); goto LockHandle; @@ -1314,7 +1344,7 @@ LockHandleFrom: /* lock the object, we must not convert stock objects, so don't check!!! */ - FromPrevProcId = _InterlockedCompareExchangePointer((PVOID*)&FromEntry->ProcessId, FromProcessId, FromLockedProcessId); + FromPrevProcId = InterlockedCompareExchangePointer((PVOID*)&FromEntry->ProcessId, FromProcessId, FromLockedProcessId); if (FromPrevProcId == FromProcessId) { PW32THREAD PrevThread; @@ -1347,7 +1377,7 @@ GDIOBJ_SetOwnership(CopyTo, NULL); } - (void)_InterlockedExchangePointer((PVOID*)&FromEntry->ProcessId, FromPrevProcId); + (void)InterlockedExchangePointer((PVOID*)&FromEntry->ProcessId, FromPrevProcId); } else { @@ -1359,7 +1389,7 @@ being deleted in the meantime (because we don't have aquired a reference at this point). FIXME - we should give up after some time unless we want to wait forever! */ - (void)_InterlockedExchangePointer((PVOID*)&FromEntry->ProcessId, FromPrevProcId); + (void)InterlockedExchangePointer((PVOID*)&FromEntry->ProcessId, FromPrevProcId); DelayExecution(); goto LockHandleFrom;
15 years, 10 months
1
0
0
0
[jmorlan] 39628: - Improve performance of TYPE command by reading more than 1 byte at a time. (Bug 4057) - Also allow it to be interrupted by ^C.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Mon Feb 16 15:50:54 2009 New Revision: 39628 URL:
http://svn.reactos.org/svn/reactos?rev=39628&view=rev
Log: - Improve performance of TYPE command by reading more than 1 byte at a time. (Bug 4057) - Also allow it to be interrupted by ^C. Modified: trunk/reactos/base/shell/cmd/type.c Modified: trunk/reactos/base/shell/cmd/type.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/type.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/type.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/type.c [iso-8859-1] Mon Feb 16 15:50:54 2009 @@ -35,7 +35,7 @@ { TCHAR buff[256]; HANDLE hFile, hConsoleOut; - BOOL bRet; + DWORD dwRet; INT argc,i; LPTSTR *argv; LPTSTR errmsg; @@ -99,28 +99,34 @@ continue; } - do + if (bPaging) { - bRet = FileGetString (hFile, buff, sizeof(buff) / sizeof(TCHAR)); - if(bPaging) + while (FileGetString (hFile, buff, sizeof(buff) / sizeof(TCHAR))) { - if(bRet) + if (ConOutPrintfPaging(bFirstTime, _T("%s"), buff) == 1) { - if (ConOutPrintfPaging(bFirstTime, _T("%s"), buff) == 1) - { - bCtrlBreak = FALSE; - return 0; - } + bCtrlBreak = FALSE; + CloseHandle(hFile); + freep(argv); + return 0; + } + bFirstTime = FALSE; + } + } + else + { + while (ReadFile(hFile, buff, sizeof(buff), &dwRet, NULL) && dwRet > 0) + { + WriteFile(hConsoleOut, buff, dwRet, &dwRet, NULL); + if (bCtrlBreak) + { + bCtrlBreak = FALSE; + CloseHandle(hFile); + freep(argv); + return 0; } } - else - { - if(bRet) - ConOutPrintf(_T("%s"), buff); - } - bFirstTime = FALSE; - - } while(bRet); + } CloseHandle(hFile); }
15 years, 10 months
1
0
0
0
[fireball] 39627: - Don't reference target process in the beginning of NtQueryInformationProcess but check buffer's length first. Found out by Dmitry Chapyshev, fixes 3 winetests.
by fireball@svn.reactos.org
Author: fireball Date: Mon Feb 16 11:15:09 2009 New Revision: 39627 URL:
http://svn.reactos.org/svn/reactos?rev=39627&view=rev
Log: - Don't reference target process in the beginning of NtQueryInformationProcess but check buffer's length first. Found out by Dmitry Chapyshev, fixes 3 winetests. Modified: trunk/reactos/ntoskrnl/ps/query.c Modified: trunk/reactos/ntoskrnl/ps/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=39…
============================================================================== --- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Mon Feb 16 11:15:09 2009 @@ -89,19 +89,8 @@ if (!NT_SUCCESS(Status)) return Status; #endif - /* Check if this isn't the cookie class */ - if(ProcessInformationClass != ProcessCookie) - { - /* Reference the process */ - Status = ObReferenceObjectByHandle(ProcessHandle, - PROCESS_QUERY_INFORMATION, - PsProcessType, - PreviousMode, - (PVOID*)&Process, - NULL); - if (!NT_SUCCESS(Status)) return Status; - } - else if(ProcessHandle != NtCurrentProcess()) + if((ProcessInformationClass == ProcessCookie) && + (ProcessHandle != NtCurrentProcess())) { /* * Retreiving the process cookie is only allowed for the calling process @@ -125,6 +114,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Protect writes with SEH */ _SEH2_TRY { @@ -145,6 +144,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Quote limits and I/O Counters: not implemented */ @@ -158,7 +160,18 @@ break; } + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + Status = STATUS_NOT_IMPLEMENTED; + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Timing */ @@ -172,6 +185,15 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; /* Protect writes with SEH */ _SEH2_TRY @@ -190,6 +212,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Process Debug Port */ @@ -203,6 +228,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Protect write with SEH */ _SEH2_TRY { @@ -216,6 +251,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* LDT, WS and VDM Information: not implemented */ @@ -236,6 +274,15 @@ break; } + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Count the number of handles this process has */ HandleCount = ObGetProcessHandleCount(Process); @@ -251,6 +298,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Session ID for the process */ @@ -264,6 +314,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Enter SEH for write safety */ _SEH2_TRY { @@ -276,6 +336,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* WOW64: Not implemented */ @@ -294,6 +357,15 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; /* Enter SEH for write safety */ _SEH2_TRY @@ -318,6 +390,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Hard Error Processing Mode */ @@ -331,6 +406,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Enter SEH for writing back data */ _SEH2_TRY { @@ -344,6 +429,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Priority Boosting status */ @@ -357,6 +445,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Enter SEH for writing back data */ _SEH2_TRY { @@ -370,6 +468,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* DOS Device Map */ @@ -383,6 +484,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Query the device map information */ ObQueryDeviceMapInformation(Process, &DeviceMap); @@ -397,6 +508,9 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Priority class */ @@ -410,6 +524,16 @@ Status = STATUS_INFO_LENGTH_MISMATCH; break; } + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; + /* Enter SEH for writing back data */ _SEH2_TRY { @@ -422,9 +546,21 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; + + /* Dereference the process */ + ObDereferenceObject(Process); break; case ProcessImageFileName: + + /* Reference the process */ + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + PsProcessType, + PreviousMode, + (PVOID*)&Process, + NULL); + if (!NT_SUCCESS(Status)) break; /* Get the image path */ Status = SeLocateProcessImageName(Process, &ImageName); @@ -465,6 +601,8 @@ /* Free the image path */ ExFreePool(ImageName); } + /* Dereference the process */ + ObDereferenceObject(Process); break; /* Per-process security cookie */ @@ -537,8 +675,6 @@ } _SEH2_END; - /* If we referenced the process, dereference it */ - if(ProcessInformationClass != ProcessCookie) ObDereferenceObject(Process); return Status; }
15 years, 10 months
1
0
0
0
[arty] 39613: Fix loopback adapter locking and make traffic work consistently. Fix zero-address binding. Local tcp services should work now.
by arty@svn.reactos.org
Author: arty Date: Sun Feb 15 15:52:56 2009 New Revision: 39613 URL:
http://svn.reactos.org/svn/reactos?rev=39613&view=rev
Log: Fix loopback adapter locking and make traffic work consistently. Fix zero-address binding. Local tcp services should work now. Modified: trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c trunk/reactos/lib/drivers/ip/network/address.c trunk/reactos/lib/drivers/ip/network/ip.c trunk/reactos/lib/drivers/ip/network/loopback.c trunk/reactos/lib/drivers/ip/transport/udp/udp.c Modified: trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Sun Feb 15 15:52:56 2009 @@ -242,7 +242,6 @@ PVOID Options) { IPv4_RAW_ADDRESS IPv4Address; - BOOLEAN Matched; PADDRESS_FILE AddrFile; TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol)); @@ -260,21 +259,19 @@ AddrFile->Free = AddrFileFree; /* Make sure address is a local unicast address or 0 */ - - /* Locate address entry. If specified address is 0, a random address is chosen */ - /* FIXME: IPv4 only */ AddrFile->Family = Address->Address[0].AddressType; IPv4Address = Address->Address[0].Address[0].in_addr; - if (IPv4Address == 0) - Matched = IPGetDefaultAddress(&AddrFile->Address); + if (IPv4Address != 0 && + !AddrLocateADEv4(IPv4Address, &AddrFile->Address)) { + exFreePool(AddrFile); + TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n", DN2H(IPv4Address))); + return STATUS_INVALID_PARAMETER; + } else - Matched = AddrLocateADEv4(IPv4Address, &AddrFile->Address); - - if (!Matched) { - exFreePool(AddrFile); - TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n", DN2H(IPv4Address))); - return STATUS_INVALID_PARAMETER; + { + /* Bound to the default address ... Copy the address type */ + AddrFile->Address.Type = IP_ADDRESS_V4; } TI_DbgPrint(MID_TRACE, ("Opening address %s for communication (P=%d U=%d).\n", Modified: trunk/reactos/lib/drivers/ip/network/address.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/add…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/address.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/address.c [iso-8859-1] Sun Feb 15 15:52:56 2009 @@ -223,6 +223,7 @@ { if (Address1->Type != Address2->Type) { DbgPrint("AddrIsEqual: Unequal Address Types\n"); + ASSERT(FALSE); return FALSE; } Modified: trunk/reactos/lib/drivers/ip/network/ip.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/ip.…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] Sun Feb 15 15:52:56 2009 @@ -195,6 +195,8 @@ INIT_TAG(IF, TAG('F','A','C','E')); + RtlZeroMemory(IF, sizeof(IP_INTERFACE)); + IF->Free = FreeIF; IF->Context = BindInfo->Context; IF->HeaderSize = BindInfo->HeaderSize; @@ -209,6 +211,11 @@ IF->Address = BindInfo->Address; IF->AddressLength = BindInfo->AddressLength; IF->Transmit = BindInfo->Transmit; + + IF->Unicast.Type = IP_ADDRESS_V4; + IF->PointToPoint.Type = IP_ADDRESS_V4; + IF->Netmask.Type = IP_ADDRESS_V4; + IF->Broadcast.Type = IP_ADDRESS_V4; TcpipInitializeSpinLock(&IF->Lock); Modified: trunk/reactos/lib/drivers/ip/network/loopback.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/loo…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/loopback.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/loopback.c [iso-8859-1] Sun Feb 15 15:52:56 2009 @@ -32,49 +32,57 @@ UINT BytesTransferred; PNDIS_BUFFER NdisBuffer; IP_PACKET IPPacket; + KIRQL OldIrql; TI_DbgPrint(DEBUG_DATALINK, ("Called.\n")); - while( (ListEntry = - ExInterlockedRemoveHeadList( &LoopWorkList, &LoopWorkLock )) ) { - WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry); - - TI_DbgPrint(DEBUG_DATALINK, ("WorkItem: %x\n", WorkItem)); - - Packet = WorkItem->Packet; - Adapter = WorkItem->Adapter; - BytesTransferred = WorkItem->BytesTransferred; - - exFreePool( WorkItem ); - + TcpipAcquireSpinLock( &LoopWorkLock, &OldIrql ); + while( !IsListEmpty(&LoopWorkList) ) + { + ListEntry = RemoveHeadList( &LoopWorkList ); + TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); + + WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry); + + TI_DbgPrint(DEBUG_DATALINK, ("WorkItem: %x\n", WorkItem)); + + Packet = WorkItem->Packet; + Adapter = WorkItem->Adapter; + BytesTransferred = WorkItem->BytesTransferred; + + exFreePool( WorkItem ); + IPPacket.NdisPacket = Packet; - + TI_DbgPrint(DEBUG_DATALINK, ("Packet %x Adapter %x Trans %x\n", Packet, Adapter, BytesTransferred)); - + NdisGetFirstBufferFromPacket(Packet, &NdisBuffer, &IPPacket.Header, &IPPacket.ContigSize, &IPPacket.TotalSize); - IPPacket.ContigSize = IPPacket.TotalSize = BytesTransferred; + IPPacket.ContigSize = IPPacket.TotalSize = BytesTransferred; /* Determine which upper layer protocol that should receive this packet and pass it to the correct receive handler */ - - TI_DbgPrint(MID_TRACE, - ("ContigSize: %d, TotalSize: %d, BytesTransferred: %d\n", - IPPacket.ContigSize, IPPacket.TotalSize, - BytesTransferred)); - - IPPacket.Position = 0; - + + TI_DbgPrint + (MID_TRACE, + ("ContigSize: %d, TotalSize: %d, BytesTransferred: %d\n", + IPPacket.ContigSize, IPPacket.TotalSize, + BytesTransferred)); + + IPPacket.Position = 0; + IPReceive(Loopback, &IPPacket); - - FreeNdisPacket( Packet ); + + FreeNdisPacket( Packet ); + TcpipAcquireSpinLock( &LoopWorkLock, &OldIrql ); } TI_DbgPrint(DEBUG_DATALINK, ("Leaving\n")); LoopReceiveWorkerBusy = FALSE; + TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); } VOID LoopSubmitReceiveWork( Modified: trunk/reactos/lib/drivers/ip/transport/udp/udp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/u…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] Sun Feb 15 15:52:56 2009 @@ -9,7 +9,6 @@ */ #include "precomp.h" - BOOLEAN UDPInitialized = FALSE; PORT_SET UDPPorts; @@ -164,41 +163,48 @@ IP_PACKET Packet; PTA_IP_ADDRESS RemoteAddressTa = (PTA_IP_ADDRESS)ConnInfo->RemoteAddress; IP_ADDRESS RemoteAddress; + IP_ADDRESS LocalAddress; USHORT RemotePort; NTSTATUS Status; PNEIGHBOR_CACHE_ENTRY NCE; TI_DbgPrint(MID_TRACE,("Sending Datagram(%x %x %x %d)\n", - AddrFile, ConnInfo, BufferData, DataSize)); + AddrFile, ConnInfo, BufferData, DataSize)); TI_DbgPrint(MID_TRACE,("RemoteAddressTa: %x\n", RemoteAddressTa)); switch( RemoteAddressTa->Address[0].AddressType ) { case TDI_ADDRESS_TYPE_IP: - RemoteAddress.Type = IP_ADDRESS_V4; - RemoteAddress.Address.IPv4Address = - RemoteAddressTa->Address[0].Address[0].in_addr; - RemotePort = RemoteAddressTa->Address[0].Address[0].sin_port; - break; + RemoteAddress.Type = IP_ADDRESS_V4; + RemoteAddress.Address.IPv4Address = + RemoteAddressTa->Address[0].Address[0].in_addr; + RemotePort = RemoteAddressTa->Address[0].Address[0].sin_port; + break; default: - return STATUS_UNSUCCESSFUL; - } + return STATUS_UNSUCCESSFUL; + } + + if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { + return STATUS_UNSUCCESSFUL; + } + + LocalAddress = AddrFile->Address; + if (AddrIsUnspecified(&LocalAddress)) + { + if (!IPGetDefaultAddress(&LocalAddress)) + return FALSE; + } Status = BuildUDPPacket( &Packet, - &RemoteAddress, - RemotePort, - &AddrFile->Address, - AddrFile->Port, - BufferData, - DataSize ); + &RemoteAddress, + RemotePort, + &LocalAddress, + AddrFile->Port, + BufferData, + DataSize ); if( !NT_SUCCESS(Status) ) - return Status; - - if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { - FreeNdisPacket(Packet.NdisPacket); - return STATUS_UNSUCCESSFUL; - } + return Status; if (!NT_SUCCESS(Status = IPSendDatagram( &Packet, NCE, UDPSendPacketComplete, NULL ))) {
15 years, 10 months
2
1
0
0
[janderwald] 39626: - Fix compilation
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Feb 16 08:49:59 2009 New Revision: 39626 URL:
http://svn.reactos.org/svn/reactos?rev=39626&view=rev
Log: - Fix compilation Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
============================================================================== --- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h [iso-8859-1] Mon Feb 16 08:49:59 2009 @@ -63,7 +63,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 0, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_CLOSE_WDMAUD @@ -80,7 +80,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 1, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); \ + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \ /// IOCTL_GETNUMDEVS_TYPE @@ -98,7 +98,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 2, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_SETDEVICE_STATE @@ -115,7 +115,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 3, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_GETDEVID @@ -133,7 +133,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 4, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_GETVOLUME @@ -150,8 +150,8 @@ #define IOCTL_GETVOLUME \ CTL_CODE(FILE_DEVICE_SOUND, \ 5, \ - METHOD_BUFFEERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + METHOD_BUFFERED, \ + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_SETVOLUME @@ -168,7 +168,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 6, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_GETCAPABILTIES @@ -185,7 +185,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 7, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) /// IOCTL_WRITEDATA @@ -202,7 +202,7 @@ CTL_CODE(FILE_DEVICE_SOUND, \ 8, \ METHOD_BUFFERED, \ - FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS); + FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) #endif
15 years, 10 months
1
0
0
0
[tkreuzer] 39625: fix PSEH build for x86
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Feb 16 08:44:05 2009 New Revision: 39625 URL:
http://svn.reactos.org/svn/reactos?rev=39625&view=rev
Log: fix PSEH build for x86 Modified: branches/ros-amd64-bringup/reactos/lib/pseh/pseh.rbuild Modified: branches/ros-amd64-bringup/reactos/lib/pseh/pseh.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/p…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/pseh/pseh.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/pseh/pseh.rbuild [iso-8859-1] Mon Feb 16 08:44:05 2009 @@ -7,7 +7,6 @@ <file>framebased-gcchack.c</file> <file>framebased-gcchack-asm.S</file> </directory> - <file>framebased-gcchack.c</file> </if> <if property="ARCH" value="powerpc"> <directory name="powerpc">
15 years, 10 months
1
0
0
0
[dchapyshev] 39624: - Fix build
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Mon Feb 16 06:34:32 2009 New Revision: 39624 URL:
http://svn.reactos.org/svn/reactos?rev=39624&view=rev
Log: - Fix build Modified: trunk/reactos/lib/rtl/unicode.c Modified: trunk/reactos/lib/rtl/unicode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicode.c?rev=3962…
============================================================================== --- trunk/reactos/lib/rtl/unicode.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/unicode.c [iso-8859-1] Mon Feb 16 06:34:32 2009 @@ -1594,12 +1594,22 @@ if (Len > Length) return STATUS_BUFFER_OVERFLOW; +#if 1 /* It needs to be removed, when will probably use SEH in rtl */ + if (String == NULL) + { + return STATUS_ACCESS_VIOLATION; + } +#endif + +#if 0 _SEH2_TRY { +#endif if (Len == Length) RtlCopyMemory(String, Pos, Len); else RtlCopyMemory(String, Pos, Len + 1); +#if 0 } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -1607,6 +1617,7 @@ Status = _SEH2_GetExceptionCode(); } _SEH2_END; +#endif return Status; }
15 years, 10 months
1
0
0
0
[fireball] 39623: - Add declarations for unsafe fastmutex functions.
by fireball@svn.reactos.org
Author: fireball Date: Mon Feb 16 06:10:08 2009 New Revision: 39623 URL:
http://svn.reactos.org/svn/reactos?rev=39623&view=rev
Log: - Add declarations for unsafe fastmutex functions. Modified: trunk/reactos/include/ddk/wdm.h Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=3962…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Mon Feb 16 06:10:08 2009 @@ -2464,6 +2464,18 @@ IN OUT PFAST_MUTEX FastMutex); NTKERNELAPI +VOID +FASTCALL +ExAcquireFastMutexUnsafe( + IN OUT PFAST_MUTEX FastMutex); + +NTKERNELAPI +VOID +FASTCALL +ExReleaseFastMutexUnsafe( + IN OUT PFAST_MUTEX FastMutex); + +NTKERNELAPI BOOLEAN NTAPI ExAcquireResourceExclusiveLite(
15 years, 10 months
1
0
0
0
[dchapyshev] 39622: - Reimplement RtlLargeIntegerToChar (based on Wine code with my changes). It fixes all large_int Wine tests
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Mon Feb 16 06:07:27 2009 New Revision: 39622 URL:
http://svn.reactos.org/svn/reactos?rev=39622&view=rev
Log: - Reimplement RtlLargeIntegerToChar (based on Wine code with my changes). It fixes all large_int Wine tests Modified: trunk/reactos/lib/rtl/unicode.c Modified: trunk/reactos/lib/rtl/unicode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicode.c?rev=3962…
============================================================================== --- trunk/reactos/lib/rtl/unicode.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/unicode.c [iso-8859-1] Mon Feb 16 06:07:27 2009 @@ -1559,56 +1559,56 @@ IN ULONG Length, IN OUT PCHAR String) { - NTSTATUS Status = STATUS_SUCCESS; - ULONG Radix; - CHAR temp[65]; - ULONGLONG v = Value->QuadPart; - ULONG i; - PCHAR tp; - PCHAR sp; - - Radix = Base; - if (Radix == 0) - Radix = 10; - - if ((Radix != 2) && (Radix != 8) && - (Radix != 10) && (Radix != 16)) - return STATUS_INVALID_PARAMETER; - - tp = temp; - while (v || tp == temp) - { - i = v % Radix; - v = v / Radix; - if (i < 10) - *tp = i + '0'; - else - *tp = i + 'A' - 10; - tp++; - } - - if ((ULONG)((ULONG_PTR)tp - (ULONG_PTR)temp) > Length) - return STATUS_BUFFER_OVERFLOW; - - //_SEH2_TRY - { - sp = String; - while (tp > temp) - *sp++ = *--tp; - - if((ULONG)((ULONG_PTR)sp - (ULONG_PTR)String) < Length) - *sp = 0; - } -#if 0 - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* Get the error code */ - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; -#endif - - return Status; + ULONGLONG Val = Value->QuadPart; + NTSTATUS Status = STATUS_SUCCESS; + CHAR Buffer[65]; + CHAR Digit; + ULONG Len; + PCHAR Pos; + + if (Base == 0) Base = 10; + + if ((Base != 2) && (Base != 8) && + (Base != 10) && (Base != 16)) + { + return STATUS_INVALID_PARAMETER; + } + + Pos = &Buffer[64]; + *Pos = '\0'; + + do + { + Pos--; + Digit = Val % Base; + Val = Val / Base; + if (Digit < 10) + *Pos = '0' + Digit; + else + *Pos = 'A' + Digit - 10; + } + while (Val != 0L); + + Len = &Buffer[64] - Pos; + + if (Len > Length) + return STATUS_BUFFER_OVERFLOW; + + _SEH2_TRY + { + if (Len == Length) + RtlCopyMemory(String, Pos, Len); + else + RtlCopyMemory(String, Pos, Len + 1); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + /* Get the error code */ + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + + return Status; } /*
15 years, 10 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
56
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
Results per page:
10
25
50
100
200