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 2017
----- 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
15 participants
160 discussions
Start a n
N
ew thread
[tfaber] 73613: [CMAKE] - Add missing target-level dependency when passing a target to add_rostests_file
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jan 28 21:41:12 2017 New Revision: 73613 URL:
http://svn.reactos.org/svn/reactos?rev=73613&view=rev
Log: [CMAKE] - Add missing target-level dependency when passing a target to add_rostests_file Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
============================================================================== --- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Sat Jan 28 21:41:12 2017 @@ -837,7 +837,11 @@ set(_ROSTESTS_SUBDIR "/${_ROSTESTS_SUBDIR}") endif() - add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION "reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_RENAME} FOR all) + if(_ROSTESTS_TARGET) + add_cd_file(TARGET ${_ROSTESTS_TARGET} FILE ${_ROSTESTS_FILE} DESTINATION "reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_RENAME} FOR all) + else() + add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION "reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_RENAME} FOR all) + endif() if(DEFINED ENV{ROSTESTS_INSTALL}) install(FILES ${_ROSTESTS_FILE} DESTINATION "$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests RENAME ${_ROSTESTS_RENAME})
7 years, 11 months
1
0
0
0
[dquintana] 73612: [EXPLORER] * Recreated the start menu banner as a SVG file in Inkscape. * Deleted old PSD (Photoshop) files. * Replaced the explorer banner BMP with one exported by Inkscape from...
by dquintana@svn.reactos.org
Author: dquintana Date: Sat Jan 28 21:11:39 2017 New Revision: 73612 URL:
http://svn.reactos.org/svn/reactos?rev=73612&view=rev
Log: [EXPLORER] * Recreated the start menu banner as a SVG file in Inkscape. * Deleted old PSD (Photoshop) files. * Replaced the explorer banner BMP with one exported by Inkscape from the SVG file. The end result is slightly sharper text, but otherwise identical. Added: trunk/reactos/base/shell/explorer/res/src/start_menu_banner.svg Removed: trunk/reactos/base/shell/explorer/res/src/logov.psd trunk/reactos/base/shell/explorer/res/src/logov_old.psd Modified: trunk/reactos/base/shell/explorer/res/bmp/158.bmp Modified: trunk/reactos/base/shell/explorer/res/bmp/158.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/res/bm…
============================================================================== Binary files - no diff available. Removed: trunk/reactos/base/shell/explorer/res/src/logov.psd URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/res/sr…
============================================================================== Binary file - no diff available. Removed: trunk/reactos/base/shell/explorer/res/src/logov_old.psd URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/res/sr…
============================================================================== Binary file - no diff available. Added: trunk/reactos/base/shell/explorer/res/src/start_menu_banner.svg URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/res/sr…
============================================================================== --- trunk/reactos/base/shell/explorer/res/src/start_menu_banner.svg (added) +++ trunk/reactos/base/shell/explorer/res/src/start_menu_banner.svg [iso-8859-1] Sat Jan 28 21:11:39 2017 @@ -0,0 +1,219 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (
http://www.inkscape.org/
) --> + +<svg + xmlns:dc="
http://purl.org/dc/elements/1.1/
" + xmlns:cc="
http://creativecommons.org/ns#
" + xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#
" + xmlns:svg="
http://www.w3.org/2000/svg
" + xmlns="
http://www.w3.org/2000/svg
" + xmlns:xlink="
http://www.w3.org/1999/xlink
" + xmlns:sodipodi="
http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd
" + xmlns:inkscape="
http://www.inkscape.org/namespaces/inkscape
" + width="21pt" + height="233pt" + viewBox="0 0 26.250001 291.25001" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="Logo.svg" + inkscape:export-filename="F:\reactos\Logo.png" + inkscape:export-xdpi="72" + inkscape:export-ydpi="72"> + <defs + id="defs4"> + <linearGradient + inkscape:collect="always" + id="linearGradient4745"> + <stop + style="stop-color:#8ab3db;stop-opacity:1;" + offset="0" + id="stop4747" /> + <stop + style="stop-color:#8ab3db;stop-opacity:0;" + offset="1" + id="stop4749" /> + </linearGradient> + <clipPath + id="clipPath5851"> + <path + inkscape:connector-curvature="0" + d="m 49.8125,31.83884 c -3.255639,0.0909 -5.959696,1.08533 -7.8125,3.0625 -1.852812,1.97712 -2.651641,4.74531 -2.53125,8 0.120391,3.25469 1.159967,6.99107 2.96875,11.03125 3.617567,8.08035 10.384054,17.29707 19.4375,25.78125 9.053319,8.48356 18.670786,14.63275 26.96875,17.71875 4.148982,1.543 7.963087,2.3409 11.21875,2.25 3.25566,-0.091 5.9597,-1.0853 7.8125,-3.0625 1.85283,-1.9772 2.65165,-4.7453 2.53125,-8 -0.1204,-3.25471 -1.12869,-6.99108 -2.9375,-11.03125 -3.61762,-8.08034 -10.384044,-17.29712 -19.4375,-25.78125 -9.053372,-8.4838 -18.702095,-14.63285 -27,-17.71875 -4.148953,-1.54295 -7.963111,-2.34093 -11.21875,-2.25 z m 0.03125,0.75 c 3.122295,-0.0872 6.850784,0.66769 10.9375,2.1875 8.173432,3.03961 17.757149,9.13541 26.75,17.5625 8.992932,8.42742 15.68665,17.57212 19.25,25.53125 1.78168,3.97956 2.79078,7.65984 2.90625,10.78125 0.11547,3.12145 -0.65234,5.66385 -2.34375,7.46875 -1.69138,1.8049 -4.15893,2.7253 -7.28125,2.8125 -3.122321,0.087 -6.882003,-0.6677 -10.96875,-2.1875 C 80.920255,93.70539 71.367797,87.60944 62.375,79.18259 53.382079,70.75513 46.65705,61.61048 43.09375,53.65134 c -1.78165,-3.97957 -2.75954,-7.65986 -2.875,-10.78125 -0.11546,-3.12139 0.621108,-5.66388 2.3125,-7.46875 1.691387,-1.80492 4.190205,-2.72529 7.3125,-2.8125 z" + id="path5853" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.73234254;marker:none;enable-background:accumulate" /> + </clipPath> + <clipPath + id="clipPath5827"> + <path + inkscape:connector-curvature="0" + d="m 92.4375,31.83884 c -3.255663,-0.0909 -7.069767,0.70705 -11.21875,2.25 -8.297966,3.08589 -17.946678,9.23495 -27,17.71875 -9.053446,8.48418 -15.788683,17.70088 -19.40625,25.78125 -1.808783,4.04018 -2.848359,7.77655 -2.96875,11.03125 -0.120391,3.2547 0.678439,6.0229 2.53125,8 1.852812,1.9772 4.556857,2.9716 7.8125,3.0625 3.255643,0.091 7.069798,-0.707 11.21875,-2.25 8.297904,-3.086 17.946639,-9.23515 27,-17.71875 9.053456,-8.48414 15.81988,-17.70092 19.4375,-25.78125 1.80881,-4.04017 2.8171,-7.77654 2.9375,-11.03125 0.1204,-3.25471 -0.67842,-6.02283 -2.53125,-8 -1.852802,-1.97715 -4.556837,-2.97157 -7.8125,-3.0625 z m -0.03125,0.75 c 3.122321,0.0872 5.621118,1.00761 7.3125,2.8125 1.69142,1.80493 2.45922,4.34735 2.34375,7.46875 -0.11547,3.1214 -1.12457,6.80169 -2.90625,10.78125 -3.563352,7.95912 -10.257067,17.10382 -19.25,25.53125 -8.992842,8.42688 -18.576566,14.5228 -26.75,17.5625 -4.086717,1.5198 -7.815202,2.2747 -10.9375,2.1875 -3.122298,-0.087 -5.621108,-1.0076 -7.3125,-2.8125 -1.691393,-1.8049 -2.42796,-4.3474 -2.3125,-7.46875 0.11546,-3.1214 1.09335,-6.80167 2.875,-10.78125 3.5633,-7.95915 10.257078,-17.10379 19.25,-25.53125 8.992797,-8.42709 18.576507,-14.5229 26.75,-17.5625 4.086746,-1.5198 7.815179,-2.27471 10.9375,-2.1875 z" + id="path5829" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.73234254;marker:none;enable-background:accumulate" /> + </clipPath> + <clipPath + id="clipPath5835"> + <path + inkscape:connector-curvature="0" + d="m 96.40625,35.74509 c -3.255662,-0.0909 -7.069767,0.70705 -11.21875,2.25 -8.297965,3.08589 -17.946677,9.23494 -27,17.71875 -9.053446,8.48418 -15.788683,17.70089 -19.40625,25.78125 -1.808783,4.04018 -2.848359,7.77655 -2.96875,11.0312 -0.120391,3.2547 0.678438,6.0229 2.53125,8 1.852812,1.9772 4.556859,2.9717 7.8125,3.0626 3.255641,0.091 7.0698,-0.7071 11.21875,-2.25 8.2979,-3.086 17.946628,-9.2352 27,-17.7188 9.053457,-8.48415 15.81988,-17.70092 19.4375,-25.78125 1.80881,-4.04017 2.8171,-7.77654 2.9375,-11.03125 0.1204,-3.25471 -0.67842,-6.02283 -2.53125,-8 -1.8528,-1.97715 -4.556838,-2.97157 -7.8125,-3.0625 z m -0.03125,0.75 c 3.12232,0.0872 5.62112,1.0076 7.3125,2.8125 1.69142,1.80493 2.45922,4.34735 2.34375,7.46875 -0.11547,3.1214 -1.12457,6.80169 -2.90625,10.78125 -3.563352,7.95912 -10.257065,17.10381 -19.25,25.53125 -8.992854,8.42685 -18.576569,14.52285 -26.75,17.56245 -4.086715,1.5199 -7.815204,2.2747 -10.9375,2.1876 -3.122296,-0.087 -5.621107,-1.0076 -7.3125,-2.8126 -1.691392,-1.8048 -2.42796,-4.3473 -2.3125,-7.4687 0.11546,-3.1214 1.09335,-6.80168 2.875,-10.78125 3.5633,-7.95915 10.257079,-17.10378 19.25,-25.53125 8.992798,-8.42709 18.576508,-14.5229 26.75,-17.5625 4.086746,-1.5198 7.81518,-2.27471 10.9375,-2.1875 z" + id="path5837" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.73234254;marker:none;enable-background:accumulate" /> + </clipPath> + <clipPath + id="clipPath5859"> + <path + inkscape:connector-curvature="0" + d="m 45.84375,35.74509 c -3.25564,0.0909 -5.959689,1.08533 -7.8125,3.0625 -1.852812,1.97712 -2.651641,4.74531 -2.53125,8 0.120391,3.25469 1.159967,6.99108 2.96875,11.03125 3.617567,8.08035 10.384055,17.29708 19.4375,25.78125 9.053321,8.4836 18.670786,14.6328 26.96875,17.7188 4.148982,1.5429 7.963087,2.3408 11.21875,2.25 3.255663,-0.091 5.99095,-1.0854 7.84375,-3.0626 1.85283,-1.9771 2.6204,-4.7452 2.5,-8 C 106.3171,89.27164 105.30881,85.53526 103.5,81.49509 99.882381,73.41475 93.115959,64.198 84.0625,55.71384 c -9.053373,-8.4838 -18.702098,-14.63285 -27,-17.71875 -4.148951,-1.54295 -7.96311,-2.34094 -11.21875,-2.25 z m 0.03125,0.75 c 3.122296,-0.0872 6.850786,0.66769 10.9375,2.1875 8.173428,3.03961 17.757148,9.13542 26.75,17.5625 8.992936,8.42745 15.686648,17.57212 19.25,25.53125 1.78168,3.97957 2.79078,7.65985 2.90625,10.78125 0.11547,3.1214 -0.65234,5.6638 -2.34375,7.4687 -1.69138,1.805 -4.15893,2.7254 -7.28125,2.8126 -3.12232,0.087 -6.882003,-0.6677 -10.96875,-2.1876 C 76.951506,97.61169 67.399051,91.51569 58.40625,83.08884 49.413329,74.66138 42.6883,65.51673 39.125,57.55759 37.34335,53.57802 36.36546,49.89773 36.25,46.77634 c -0.11546,-3.12139 0.621108,-5.66388 2.3125,-7.46875 1.691394,-1.80492 4.190204,-2.72529 7.3125,-2.8125 z" + id="path5861" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.73234254;marker:none;enable-background:accumulate" /> + </clipPath> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4745" + id="linearGradient4751" + x1="13.21739" + y1="761.34583" + x2="13.433139" + y2="1052.5289" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-761.11214)" /> + <filter + style="color-interpolation-filters:sRGB;" + inkscape:label="Drop Shadow" + id="filter4197"> + <feFlood + flood-opacity="0.68999999999999995" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood4199" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="in" + result="composite1" + id="feComposite4201" /> + <feGaussianBlur + in="composite1" + stdDeviation="1" + result="blur" + id="feGaussianBlur4203" /> + <feOffset + dx="-0.1" + dy="1" + result="offset" + id="feOffset4205" /> + <feComposite + in="SourceGraphic" + in2="offset" + operator="over" + result="composite2" + id="feComposite4207" /> + </filter> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="2.4967109" + inkscape:cx="-34.214085" + inkscape:cy="142.13217" + inkscape:document-units="px" + inkscape:current-layer="svg2" + showgrid="false" + units="pt" + inkscape:window-width="1397" + inkscape:window-height="974" + inkscape:window-x="437" + inkscape:window-y="214" + inkscape:window-maximized="0" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="
http://purl.org/dc/dcmitype/StillImage
" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <rect + y="0" + x="0" + height="291.25" + width="26.250004" + id="rect4697-4" + style="opacity:1;fill:#5a7fb1;fill-opacity:1;stroke:none;stroke-width:10;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <rect + y="-1.8417968e-005" + x="0" + height="291.25" + width="26.250002" + id="rect4697" + style="opacity:1;fill:url(#linearGradient4751);fill-opacity:1;stroke:none;stroke-width:10;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:export-xdpi="72" + inkscape:export-ydpi="72" /> + <text + transform="matrix(0,-0.93191339,1.0473001,0,-16.177787,-724.38567)" + sodipodi:linespacing="100%" + id="text4707" + y="34.69656" + x="-1058.8489" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.14050674px;line-height:100%;font-family:'AvantGarde Bk BT';-inkscape-font-specification:'AvantGarde Bk BT, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4197)" + xml:space="preserve"><tspan + y="34.69656" + x="-1058.8489" + id="tspan4709" + sodipodi:role="line"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.00007629px;line-height:100%;font-family:'AvantGarde Bk BT';-inkscape-font-specification:'AvantGarde Bk BT, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start" + id="tspan4213">ReactOS</tspan><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.50006676px;line-height:100%;font-family:'AvantGarde Bk BT';-inkscape-font-specification:'AvantGarde Bk BT, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start" + id="tspan4209"> 0.5 - SVN</tspan></tspan></text> + <g + style="fill:#ffffff;fill-opacity:1" + id="layer1-2" + transform="matrix(-4.4824609e-5,-0.056,0.05634648,-4.4824609e-5,-16.777709,291.46496)"> + <g + style="fill:#ffffff;fill-opacity:1" + id="g5951" + transform="matrix(4.7811132,0,0,4.7811132,-80.056681,-4146.679)"> + <path + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="rect5844" + clip-path="url(#clipPath5851)" + transform="translate(0,910.62991)" + d="m 30.90625,30.78125 0,74.28125 80.625,0 0,-74.28125 -80.625,0 z m 70,6.90625 c 1.65415,0.468885 3.03874,1.278331 4.125,2.4375 4.53076,4.834816 2.50248,14.697373 -4.25,25.59375 0.0794,0.891468 0.125,1.806031 0.125,2.71875 0,3.994823 -0.77287,7.795485 -2.1875,11.28125 l 0,-2.5 c 0.873252,-2.77007 1.34375,-5.722186 1.34375,-8.78125 0,-0.502872 -0.0374,-1.003316 -0.0625,-1.5 -1.924954,2.972465 -4.175511,6.006582 -6.75,9.03125 l -11.71875,0 c 14.084231,-14.069184 21.8079,-29.622248 19.375,-38.28125 z M 70.875,38.375 c 5.033902,0 9.771221,1.246554 13.9375,3.4375 l -1.9375,0 c -3.67044,-1.662594 -7.741998,-2.59375 -12.03125,-2.59375 -4.289252,0 -8.364055,0.931156 -12.03125,2.59375 l -1.875,0 C 61.107787,39.621554 65.841098,38.375 70.875,38.375 Z" + inkscape:connector-curvature="0" /> + <path + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="path4850" + transform="translate(0,910.62991)" + d="m 70.875,39.21875 c -11.274354,0 -21.070517,6.395096 -25.9375,15.75 -0.0042,0.0081 0.0042,0.02317 0,0.03125 0.07754,0.153219 0.170333,0.314865 0.25,0.46875 0.189002,0.364736 0.392934,0.725451 0.59375,1.09375 0.385013,0.706117 0.791088,1.407542 1.21875,2.125 0.516928,0.867214 1.047412,1.74494 1.625,2.625 0.154507,0.235419 0.309984,0.482596 0.46875,0.71875 0.504797,0.750853 1.04663,1.49337 1.59375,2.25 0.597456,0.8257 1.197122,1.63927 1.84375,2.46875 0.558756,0.717849 1.155527,1.43784 1.75,2.15625 0.231929,0.279843 0.45024,0.564036 0.6875,0.84375 0.274984,0.324693 0.561677,0.644424 0.84375,0.96875 0.526712,0.604812 1.042782,1.209866 1.59375,1.8125 0.08069,0.08836 0.168791,0.161707 0.25,0.25 0.855682,0.929554 1.744704,1.861076 2.65625,2.78125 0.932914,0.942152 1.885719,1.885424 2.875,2.8125 2.611939,2.447565 5.275184,4.680384 7.9375,6.71875 0.664977,-0.509507 1.335146,-1.028218 2,-1.5625 1.994569,-1.602764 3.978844,-3.32086 5.9375,-5.15625 0.987964,-0.925838 1.942821,-1.87215 2.875,-2.8125 0.01048,-0.01058 0.02078,-0.02067 0.03125,-0.03125 1.661121,-1.678574 3.245777,-3.358318 4.71875,-5.0625 0.176801,-0.204204 0.357258,-0.420665 0.53125,-0.625 0.0193,-0.02271 0.04324,-0.03979 0.0625,-0.0625 1.043449,-1.227628 1.99838,-2.461329 2.9375,-3.6875 0.536054,-0.701261 1.092937,-1.395631 1.59375,-2.09375 0.605677,-0.8429 1.166138,-1.696008 1.71875,-2.53125 0.61629,-0.932661 1.201625,-1.862854 1.75,-2.78125 0.548375,-0.918396 1.052967,-1.819459 1.53125,-2.71875 0.08534,-0.160453 0.166936,-0.308996 0.25,-0.46875 C 92.297354,45.854598 82.359657,39.21875 70.875,39.21875 Z M 41.75,66.1875 c -0.06116,0.747306 -0.09375,1.492751 -0.09375,2.25 0,11.038093 6.116011,20.633219 15.15625,25.59375 C 57.484142,93.709774 58.16207,93.356975 58.84375,93 59.52543,92.643025 60.2155,92.266364 60.90625,91.875 61.597,91.483636 62.301149,91.080895 63,90.65625 63.242636,90.508816 63.475216,90.338856 63.71875,90.1875 61.484219,88.417439 59.256528,86.493446 57.0625,84.4375 50.722229,78.495899 45.533329,72.192164 41.75,66.1875 Z m 58.25,0.75 c -3.738782,5.775651 -8.738133,11.807594 -14.8125,17.5 -2.200161,2.061695 -4.446658,3.975926 -6.6875,5.75 0.643501,0.399108 1.299839,0.784778 1.9375,1.15625 0.596366,0.347415 1.15992,0.677219 1.75,1 0.114658,0.06272 0.229355,0.125721 0.34375,0.1875 0.420773,0.224919 0.833546,0.443626 1.25,0.65625 0.460034,0.236796 0.92014,0.466515 1.375,0.6875 8.89311,-5.005567 14.90625,-14.50549 14.90625,-25.4375 0,-0.50123 -0.0329,-1.005816 -0.0625,-1.5 z M 71.125,95.5 c -1.088659,0.70236 -2.176541,1.344854 -3.25,1.96875 0.982666,0.103354 1.987211,0.15625 3,0.15625 1.157589,0 2.286621,-0.08928 3.40625,-0.21875 C 73.239784,96.798923 72.180662,96.181072 71.125,95.5 Z" + inkscape:connector-curvature="0" /> + <path + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="rect5820" + clip-path="url(#clipPath5827)" + transform="translate(0,910.62991)" + d="m 30.90625,30.78125 0,74.28125 80.625,0 0,-74.28125 -80.625,0 z M 41.375,37.6875 c -2.574058,9.154336 6.161768,26.020861 21.8125,40.6875 15.281157,14.319459 32.235311,21.93527 41.375,19.34375 -0.39394,1.402094 -1.05856,2.65164 -2,3.65625 -7.088395,7.5642 -27.453878,-0.0271 -45.5,-16.9375 -6.340271,-5.941601 -11.529171,-12.245336 -15.3125,-18.25 -0.05634,0.740037 -0.09375,1.495693 -0.09375,2.25 0,3.059064 0.47232,6.01118 1.34375,8.78125 l 0,2.4375 c -1.401864,-3.469359 -2.1875,-7.247022 -2.1875,-11.21875 0,-1.153795 0.09116,-2.286656 0.21875,-3.40625 C 34.61001,54.397204 32.778489,44.863171 37.21875,40.125 38.305614,38.965187 39.719677,38.156282 41.375,37.6875 Z m 29.5,0.6875 c 5.033902,0 9.771221,1.246554 13.9375,3.4375 l -1.9375,0 c -3.67044,-1.662594 -7.741998,-2.59375 -12.03125,-2.59375 -4.289252,0 -8.364055,0.931156 -12.03125,2.59375 l -1.875,0 C 61.107787,39.621554 65.841098,38.375 70.875,38.375 Z" + inkscape:connector-curvature="0" /> + <path + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="path5823" + clip-path="url(#clipPath5835)" + transform="translate(0,910.62991)" + d="m 30.90625,30.78125 0,74.28125 80.625,0 0,-74.28125 -80.625,0 z M 41.375,37.6875 c -2.574058,9.154336 6.161768,26.020861 21.8125,40.6875 15.281157,14.319459 32.235311,21.93527 41.375,19.34375 -0.39394,1.402094 -1.05856,2.65164 -2,3.65625 -7.088395,7.5642 -27.453878,-0.0271 -45.5,-16.9375 -6.340271,-5.941601 -11.529171,-12.245336 -15.3125,-18.25 -0.05634,0.740037 -0.09375,1.495693 -0.09375,2.25 0,3.059064 0.47232,6.01118 1.34375,8.78125 l 0,2.4375 c -1.401864,-3.469359 -2.1875,-7.247022 -2.1875,-11.21875 0,-1.153795 0.09116,-2.286656 0.21875,-3.40625 C 34.61001,54.397204 32.778489,44.863171 37.21875,40.125 38.305614,38.965187 39.719677,38.156282 41.375,37.6875 Z m 29.5,0.6875 c 5.033902,0 9.771221,1.246554 13.9375,3.4375 l -1.9375,0 c -3.67044,-1.662594 -7.741998,-2.59375 -12.03125,-2.59375 -4.289252,0 -8.364055,0.931156 -12.03125,2.59375 l -1.875,0 C 61.107787,39.621554 65.841098,38.375 70.875,38.375 Z" + inkscape:connector-curvature="0" /> + <path + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="path5847" + clip-path="url(#clipPath5859)" + transform="translate(0,910.62991)" + d="m 30.90625,30.78125 0,74.28125 80.625,0 0,-74.28125 -80.625,0 z m 70,6.90625 c 1.65415,0.468885 3.03874,1.278331 4.125,2.4375 4.53076,4.834816 2.50248,14.697373 -4.25,25.59375 0.0794,0.891468 0.125,1.806031 0.125,2.71875 0,3.994823 -0.77287,7.795485 -2.1875,11.28125 l 0,-2.5 c 0.873252,-2.77007 1.34375,-5.722186 1.34375,-8.78125 0,-0.502872 -0.0374,-1.003316 -0.0625,-1.5 -1.924954,2.972465 -4.175511,6.006582 -6.75,9.03125 l -11.71875,0 c 14.084231,-14.069184 21.8079,-29.622248 19.375,-38.28125 z M 70.875,38.375 c 5.033902,0 9.771221,1.246554 13.9375,3.4375 l -1.9375,0 c -3.67044,-1.662594 -7.741998,-2.59375 -12.03125,-2.59375 -4.289252,0 -8.364055,0.931156 -12.03125,2.59375 l -1.875,0 C 61.107787,39.621554 65.841098,38.375 70.875,38.375 Z" + inkscape:connector-curvature="0" /> + </g> + </g> +</svg>
7 years, 11 months
1
0
0
0
[hbelusca] 73611: Fix build.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Jan 28 20:11:38 2017 New Revision: 73611 URL:
http://svn.reactos.org/svn/reactos?rev=73611&view=rev
Log: Fix build. Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] Sat Jan 28 20:11:38 2017 @@ -49,7 +49,7 @@ PFREELDR_MEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize); -BOOLEAN PcDiskGetBootPath(char *BootPath, unsigned Size); +BOOLEAN PcDiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size); BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); BOOLEAN PcDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOLEAN PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
7 years, 11 months
1
0
0
0
[hbelusca] 73610: [FREELDR]: Gently merge my local changes, part 1/x: - Adjust the prototype of DiskGetBootPath; - Add back 1 HW helper function.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Jan 28 20:06:03 2017 New Revision: 73610 URL:
http://svn.reactos.org/svn/reactos?rev=73610&view=rev
Log: [FREELDR]: Gently merge my local changes, part 1/x: - Adjust the prototype of DiskGetBootPath; - Add back 1 HW helper function. Modified: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c trunk/reactos/boot/freeldr/freeldr/disk/disk.c trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h trunk/reactos/boot/freeldr/freeldr/include/disk.h trunk/reactos/boot/freeldr/freeldr/include/machine.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -22,24 +22,16 @@ /* FUNCTIONS ******************************************************************/ -#define TAG_HW_COMPONENT_DATA 'DCwH' -#define TAG_HW_NAME 'mNwH' +#define TAG_HW_COMPONENT_DATA 'DCwH' +#define TAG_HW_NAME 'mNwH' -PVOID -NTAPI -FldrpHwHeapAlloc(IN SIZE_T Size) -{ - /* Allocate memory from generic bootloader heap */ - return FrLdrHeapAlloc(Size, 'pHwH'); -} - -static VOID +VOID NTAPI FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN PCHAR IdentifierString) { + PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry; SIZE_T IdentifierLength; - PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry; PCHAR Identifier; /* Allocate memory for the identifier */ @@ -53,6 +45,17 @@ /* Set component information */ Component->IdentifierLength = (ULONG)IdentifierLength; Component->Identifier = Identifier; +} + +VOID +NTAPI +FldrSetConfigurationData(IN PCONFIGURATION_COMPONENT_DATA ComponentData, + IN PCM_PARTIAL_RESOURCE_LIST ResourceList, + IN ULONG Size) +{ + /* Set component information */ + ComponentData->ConfigurationData = ResourceList; + ComponentData->ComponentEntry.ConfigurationDataLength = Size; } VOID @@ -155,10 +158,7 @@ /* Set configuration data */ if (ResourceList) - { - ComponentData->ConfigurationData = ResourceList; - ComponentData->ComponentEntry.ConfigurationDataLength = Size; - } + FldrSetConfigurationData(ComponentData, ResourceList, Size); /* Return the child */ *ComponentKey = ComponentData; Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -97,8 +97,7 @@ } BOOLEAN -ArmDiskGetBootPath(OUT PCHAR BootPath, - IN unsigned Size) +ArmDiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size) { PCCH Path = "ramdisk(0)"; Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -386,7 +386,7 @@ } BOOLEAN -PcDiskGetBootPath(char *BootPath, unsigned Size) +PcDiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size) { // FIXME: Keep it there, or put it in DiskGetBootPath? // Or, abstract the notion of network booting to make Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -247,7 +247,7 @@ return slots; } -BOOLEAN PpcDiskGetBootPath( char *OutBootPath, unsigned Size ) { +BOOLEAN PpcDiskGetBootPath(PCHAR OutBootPath, ULONG Size) { strncpy( OutBootPath, BootPath, Size ); return TRUE; } Modified: trunk/reactos/boot/freeldr/freeldr/disk/disk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -102,7 +102,7 @@ } BOOLEAN -DiskGetBootPath(char *BootPath, unsigned Size) +DiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size) { static char Path[] = "multi(0)disk(0)"; char Device[4]; Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -27,6 +27,21 @@ // VOID NTAPI +FldrSetIdentifier( + IN PCONFIGURATION_COMPONENT_DATA ComponentData, + IN PCHAR IdentifierString +); + +VOID +NTAPI +FldrSetConfigurationData( + IN PCONFIGURATION_COMPONENT_DATA ComponentData, + IN PCM_PARTIAL_RESOURCE_LIST ResourceList, + IN ULONG Size +); + +VOID +NTAPI FldrCreateSystemKey( OUT PCONFIGURATION_COMPONENT_DATA *SystemKey ); Modified: trunk/reactos/boot/freeldr/freeldr/include/disk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -135,7 +135,7 @@ extern PVOID DiskReadBuffer; extern SIZE_T DiskReadBufferSize; -BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size); +BOOLEAN DiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size); /////////////////////////////////////////////////////////////////////////////////////// Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sat Jan 28 20:06:03 2017 @@ -61,7 +61,7 @@ FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR* Current); PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize); - BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); + BOOLEAN (*DiskGetBootPath)(PCHAR BootPath, ULONG Size); BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry); ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber);
7 years, 11 months
1
0
0
0
[tfaber] 73609: [0.4.4] - Update start menu banner
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jan 28 19:09:24 2017 New Revision: 73609 URL:
http://svn.reactos.org/svn/reactos?rev=73609&view=rev
Log: [0.4.4] - Update start menu banner Added: branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158-rc1.bmp - copied, changed from r73608, branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158-rc2.bmp - copied, changed from r73608, branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158-rc3.bmp - copied, changed from r73608, branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp Modified: branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp Copied: branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158-rc1.bmp (from r73608, branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp) URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_4/reactos/base/s…
============================================================================== Binary files - no diff available. Copied: branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158-rc2.bmp (from r73608, branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp) URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_4/reactos/base/s…
============================================================================== Binary files - no diff available. Copied: branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158-rc3.bmp (from r73608, branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp) URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_4/reactos/base/s…
============================================================================== Binary files - no diff available. Modified: branches/ros-branch-0_4_4/reactos/base/shell/explorer/res/bmp/158.bmp URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_4/reactos/base/s…
============================================================================== Binary files - no diff available.
7 years, 11 months
1
0
0
0
[tfaber] 73608: [FREELDR] - Add missing checks for allocation failure in DetectSerialPointerPeripheral and DetectPS2Mouse. Patch by Serge Gautherie. CORE-12623
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jan 28 13:55:50 2017 New Revision: 73608 URL:
http://svn.reactos.org/svn/reactos?rev=73608&view=rev
Log: [FREELDR] - Add missing checks for allocation failure in DetectSerialPointerPeripheral and DetectPS2Mouse. Patch by Serge Gautherie. CORE-12623 Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Sat Jan 28 13:55:50 2017 @@ -1037,6 +1037,11 @@ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST); + if (PartialResourceList == NULL) + { + ERR("Failed to allocate resource descriptor\n"); + return; + } memset(PartialResourceList, 0, Size); PartialResourceList->Version = 1; PartialResourceList->Revision = 1; @@ -1577,6 +1582,11 @@ TRACE("Detected PS2 port\n"); PartialResourceList = FrLdrHeapAlloc(sizeof(CM_PARTIAL_RESOURCE_LIST), TAG_HW_RESOURCE_LIST); + if (PartialResourceList == NULL) + { + ERR("Failed to allocate resource descriptor\n"); + return; + } memset(PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST)); /* Initialize resource descriptor */ @@ -1613,6 +1623,11 @@ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST); + if (PartialResourceList == NULL) + { + ERR("Failed to allocate resource descriptor\n"); + return; + } memset(PartialResourceList, 0, Size); PartialResourceList->Version = 1; PartialResourceList->Revision = 1;
7 years, 11 months
1
0
0
0
[tfaber] 73607: [NTOS:MM] - Support MmSpecialPoolTag == '*' to mean all tags. By Serge Gautherie. CORE-12711 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jan 28 13:08:19 2017 New Revision: 73607 URL:
http://svn.reactos.org/svn/reactos?rev=73607&view=rev
Log: [NTOS:MM] - Support MmSpecialPoolTag == '*' to mean all tags. By Serge Gautherie. CORE-12711 #resolve Modified: trunk/reactos/ntoskrnl/mm/ARM3/special.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/special.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/special.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/special.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/special.c [iso-8859-1] Sat Jan 28 13:08:19 2017 @@ -78,7 +78,14 @@ { /* Special pool is not suitable for allocations bigger than 1 page */ if (NumberOfBytes > (PAGE_SIZE - sizeof(POOL_HEADER))) + { return FALSE; + } + + if (MmSpecialPoolTag == '*') + { + return TRUE; + } return Tag == MmSpecialPoolTag; }
7 years, 11 months
1
0
0
0
[hbelusca] 73606: [FREELDR] - Use 'DiskReadBufferSize' instead of hardcoded values in hwdisk.c - Transform reactos_arc_disk_info into a ARC_DISK_SIGNATURE_EX structure, so that its conversion into ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Jan 27 14:43:41 2017 New Revision: 73606 URL:
http://svn.reactos.org/svn/reactos?rev=73606&view=rev
Log: [FREELDR] - Use 'DiskReadBufferSize' instead of hardcoded values in hwdisk.c - Transform reactos_arc_disk_info into a ARC_DISK_SIGNATURE_EX structure, so that its conversion into a ARC list in winldr.c becomes a bit simpler. - In winldr.c: * In case we fail to either open the SYSTEM hive or scan it, bail out with an error message, instead of trying to continue loading ROS. * Fix an old comment related to ACPI; - In memory.c/h: Do some cleanup (in particular, just use the MachXXX macros instead of also defining functions with the same names as the macros, and which just redirect into the virtual table). Modified: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/machine.c trunk/reactos/boot/freeldr/freeldr/ntldr/winldr.c trunk/reactos/boot/freeldr/freeldr/ntldr/wlregistry.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -17,9 +17,8 @@ PCONFIGURATION_COMPONENT_DATA FldrArcHwTreeRoot; // ARC Disk Information -ARC_DISK_SIGNATURE reactos_arc_disk_info[32]; ULONG reactos_disk_count = 0; -CHAR reactos_arc_strings[32][256]; +ARC_DISK_SIGNATURE_EX reactos_arc_disk_info[32]; /* FUNCTIONS ******************************************************************/ @@ -30,11 +29,8 @@ NTAPI FldrpHwHeapAlloc(IN SIZE_T Size) { - PVOID Buffer; - /* Allocate memory from generic bootloader heap */ - Buffer = FrLdrHeapAlloc(Size, 'pHwH'); - return Buffer; + return FrLdrHeapAlloc(Size, 'pHwH'); } static VOID Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -30,8 +30,7 @@ ULONG SecondLevelIcacheFillSize; extern ULONG reactos_disk_count; -extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; -extern CHAR reactos_arc_strings[32][256]; +extern ARC_DISK_SIGNATURE_EX reactos_arc_disk_info[]; ULONG SizeBits[] = { @@ -144,11 +143,11 @@ RamDiskInitialize(); /* Fill out the ARC disk block */ - reactos_arc_disk_info[reactos_disk_count].Signature = 0xBADAB00F; - reactos_arc_disk_info[reactos_disk_count].CheckSum = 0xDEADBABE; - strcpy(reactos_arc_strings[reactos_disk_count], "ramdisk(0)"); - reactos_arc_disk_info[reactos_disk_count].ArcName = - reactos_arc_strings[reactos_disk_count]; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.Signature = 0xBADAB00F; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.CheckSum = 0xDEADBABE; + strcpy(reactos_arc_disk_info[reactos_disk_count].ArcName, "ramdisk(0)"); + reactos_arc_disk_info[reactos_disk_count].DiskSignature.ArcName = + reactos_arc_disk_info[reactos_disk_count].ArcName; reactos_disk_count++; ASSERT(reactos_disk_count == 1); Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -36,8 +36,7 @@ } DISKCONTEXT; extern ULONG reactos_disk_count; -extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; -extern CHAR reactos_arc_strings[32][256]; +extern ARC_DISK_SIGNATURE_EX reactos_arc_disk_info[]; static CHAR Hex[] = "0123456789abcdef"; UCHAR PcBiosDiskCount = 0; @@ -190,11 +189,11 @@ UCHAR DriveNumber) { PMASTER_BOOT_RECORD Mbr; - ULONG *Buffer; + PULONG Buffer; ULONG i; ULONG Checksum; ULONG Signature; - CHAR ArcName[256]; + CHAR ArcName[MAX_PATH]; PARTITION_TABLE_ENTRY PartitionTableEntry; PCHAR Identifier = PcDiskIdentifier[DriveNumber - 0x80]; @@ -208,12 +207,12 @@ Buffer = (ULONG*)DiskReadBuffer; Mbr = (PMASTER_BOOT_RECORD)DiskReadBuffer; - Signature = Mbr->Signature; + Signature = Mbr->Signature; TRACE("Signature: %x\n", Signature); /* Calculate the MBR checksum */ Checksum = 0; - for (i = 0; i < 128; i++) + for (i = 0; i < 512 / sizeof(ULONG); i++) { Checksum += Buffer[i]; } @@ -221,12 +220,12 @@ TRACE("Checksum: %x\n", Checksum); /* Fill out the ARC disk block */ - reactos_arc_disk_info[reactos_disk_count].Signature = Signature; - reactos_arc_disk_info[reactos_disk_count].CheckSum = Checksum; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.Signature = Signature; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.CheckSum = Checksum; sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)", reactos_disk_count); - strcpy(reactos_arc_strings[reactos_disk_count], ArcName); - reactos_arc_disk_info[reactos_disk_count].ArcName = - reactos_arc_strings[reactos_disk_count]; + strcpy(reactos_arc_disk_info[reactos_disk_count].ArcName, ArcName); + reactos_arc_disk_info[reactos_disk_count].DiskSignature.ArcName = + reactos_arc_disk_info[reactos_disk_count].ArcName; reactos_disk_count++; sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - 0x80); @@ -277,36 +276,39 @@ UCHAR DiskCount, DriveNumber; ULONG i; BOOLEAN Changed; - CHAR BootPath[512]; BOOLEAN BootDriveReported = FALSE; + CHAR BootPath[MAX_PATH]; /* Count the number of visible drives */ DiskReportError(FALSE); DiskCount = 0; DriveNumber = 0x80; - /* There are some really broken BIOSes out there. There are even BIOSes - * that happily report success when you ask them to read from non-existent - * harddisks. So, we set the buffer to known contents first, then try to - * read. If the BIOS reports success but the buffer contents haven't - * changed then we fail anyway */ - memset(DiskReadBuffer, 0xcd, 512); + /* + * There are some really broken BIOSes out there. There are even BIOSes + * that happily report success when you ask them to read from non-existent + * harddisks. So, we set the buffer to known contents first, then try to + * read. If the BIOS reports success but the buffer contents haven't + * changed then we fail anyway. + */ + memset(DiskReadBuffer, 0xcd, DiskReadBufferSize); while (MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, DiskReadBuffer)) { Changed = FALSE; - for (i = 0; ! Changed && i < 512; i++) + for (i = 0; !Changed && i < DiskReadBufferSize; i++) { Changed = ((PUCHAR)DiskReadBuffer)[i] != 0xcd; } - if (! Changed) + if (!Changed) { TRACE("BIOS reports success for disk %d but data didn't change\n", - (int)DiskCount); + (int)DiskCount); break; } GetHarddiskInformation(DriveNumber); + /* Check if we have seen the boot drive */ if (FrldrBootDrive == DriveNumber) BootDriveReported = TRUE; @@ -323,18 +325,25 @@ if ((FrldrBootDrive >= 0x80 && !BootDriveReported) || DiskIsDriveRemovable(FrldrBootDrive)) { - /* TODO: Check if it's really a cdrom drive */ - ULONG* Buffer; + /* TODO: Check if it's really a CDROM drive */ + + PMASTER_BOOT_RECORD Mbr; + PULONG Buffer; ULONG Checksum = 0; + ULONG Signature; /* Read the MBR */ if (!MachDiskReadLogicalSectors(FrldrBootDrive, 16ULL, 1, DiskReadBuffer)) { - ERR("Reading MBR failed\n"); - return FALSE; + ERR("Reading MBR failed\n"); + return FALSE; } Buffer = (ULONG*)DiskReadBuffer; + Mbr = (PMASTER_BOOT_RECORD)DiskReadBuffer; + + Signature = Mbr->Signature; + TRACE("Signature: %x\n", Signature); /* Calculate the MBR checksum */ for (i = 0; i < 2048 / sizeof(ULONG); i++) Checksum += Buffer[i]; @@ -342,10 +351,11 @@ TRACE("Checksum: %x\n", Checksum); /* Fill out the ARC disk block */ - reactos_arc_disk_info[reactos_disk_count].CheckSum = Checksum; - strcpy(reactos_arc_strings[reactos_disk_count], BootPath); - reactos_arc_disk_info[reactos_disk_count].ArcName = - reactos_arc_strings[reactos_disk_count]; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.Signature = Signature; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.CheckSum = Checksum; + strcpy(reactos_arc_disk_info[reactos_disk_count].ArcName, BootPath); + reactos_arc_disk_info[reactos_disk_count].DiskSignature.ArcName = + reactos_arc_disk_info[reactos_disk_count].ArcName; reactos_disk_count++; FsRegisterDevice(BootPath, &DiskVtbl); Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -27,8 +27,7 @@ //static unsigned int delay_count = 1; extern ULONG reactos_disk_count; -extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; -extern CHAR reactos_arc_strings[32][256]; +extern ARC_DISK_SIGNATURE_EX reactos_arc_disk_info[]; static PCM_PARTIAL_RESOURCE_LIST @@ -249,11 +248,11 @@ UCHAR DriveNumber) { PMASTER_BOOT_RECORD Mbr; - ULONG *Buffer; + PULONG Buffer; ULONG i; ULONG Checksum; ULONG Signature; - CHAR ArcName[256]; + CHAR ArcName[MAX_PATH]; PARTITION_TABLE_ENTRY PartitionTableEntry; /* Read the MBR */ @@ -266,12 +265,12 @@ Buffer = (ULONG*)DiskReadBuffer; Mbr = (PMASTER_BOOT_RECORD)DiskReadBuffer; - Signature = Mbr->Signature; + Signature = Mbr->Signature; TRACE("Signature: %x\n", Signature); /* Calculate the MBR checksum */ Checksum = 0; - for (i = 0; i < 128; i++) + for (i = 0; i < 512 / sizeof(ULONG); i++) { Checksum += Buffer[i]; } @@ -279,12 +278,12 @@ TRACE("Checksum: %x\n", Checksum); /* Fill out the ARC disk block */ - reactos_arc_disk_info[reactos_disk_count].Signature = Signature; - reactos_arc_disk_info[reactos_disk_count].CheckSum = Checksum; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.Signature = Signature; + reactos_arc_disk_info[reactos_disk_count].DiskSignature.CheckSum = Checksum; sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)", reactos_disk_count); - strcpy(reactos_arc_strings[reactos_disk_count], ArcName); - reactos_arc_disk_info[reactos_disk_count].ArcName = - reactos_arc_strings[reactos_disk_count]; + strcpy(reactos_arc_disk_info[reactos_disk_count].ArcName, ArcName); + reactos_arc_disk_info[reactos_disk_count].DiskSignature.ArcName = + reactos_arc_disk_info[reactos_disk_count].ArcName; reactos_disk_count++; sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - 0x80); Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -32,100 +32,103 @@ typedef enum tagVIDEODISPLAYMODE { - VideoTextMode, - VideoGraphicsMode + VideoTextMode, + VideoGraphicsMode } VIDEODISPLAYMODE, *PVIDEODISPLAYMODE; typedef struct tagMACHVTBL { - VOID (*ConsPutChar)(int Ch); - BOOLEAN (*ConsKbHit)(VOID); - int (*ConsGetCh)(VOID); + VOID (*ConsPutChar)(int Ch); + BOOLEAN (*ConsKbHit)(VOID); + int (*ConsGetCh)(VOID); - VOID (*VideoClearScreen)(UCHAR Attr); - VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init); - VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth); - ULONG (*VideoGetBufferSize)(VOID); - VOID (*VideoSetTextCursorPosition)(UCHAR X, UCHAR Y); - VOID (*VideoHideShowTextCursor)(BOOLEAN Show); - VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y); - VOID (*VideoCopyOffScreenBufferToVRAM)(PVOID Buffer); - BOOLEAN (*VideoIsPaletteFixed)(VOID); - VOID (*VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); - VOID (*VideoGetPaletteColor)(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); - VOID (*VideoSync)(VOID); - VOID (*Beep)(VOID); - VOID (*PrepareForReactOS)(IN BOOLEAN Setup); + VOID (*VideoClearScreen)(UCHAR Attr); + VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init); + VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth); + ULONG (*VideoGetBufferSize)(VOID); + VOID (*VideoSetTextCursorPosition)(UCHAR X, UCHAR Y); + VOID (*VideoHideShowTextCursor)(BOOLEAN Show); + VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y); + VOID (*VideoCopyOffScreenBufferToVRAM)(PVOID Buffer); + BOOLEAN (*VideoIsPaletteFixed)(VOID); + VOID (*VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); + VOID (*VideoGetPaletteColor)(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); + VOID (*VideoSync)(VOID); + VOID (*Beep)(VOID); + VOID (*PrepareForReactOS)(IN BOOLEAN Setup); - FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR* Current); - PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize); + // NOTE: Not in the machine.c ... + FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR* Current); + PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize); - BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); - BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); - BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry); - ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber); + BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); + BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); + BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry); + ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber); - TIMEINFO* (*GetTime)(VOID); - ULONG (*GetRelativeTime)(VOID); + // NOTE: In the machine.c under the name of "ArcGetXXXTime" + TIMEINFO* (*GetTime)(VOID); + ULONG (*GetRelativeTime)(VOID); - BOOLEAN (*InitializeBootDevices)(VOID); - PCONFIGURATION_COMPONENT_DATA (*HwDetect)(VOID); - VOID (*HwIdle)(VOID); + // NOTE: Not in the machine.c ... + BOOLEAN (*InitializeBootDevices)(VOID); + PCONFIGURATION_COMPONENT_DATA (*HwDetect)(VOID); + VOID (*HwIdle)(VOID); } MACHVTBL, *PMACHVTBL; - -VOID MachInit(const char *CmdLine); extern MACHVTBL MachVtbl; -VOID MachConsPutChar(int Ch); -BOOLEAN MachConsKbHit(VOID); -int MachConsGetCh(VOID); -VOID MachVideoClearScreen(UCHAR Attr); -VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init); -VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); -ULONG MachVideoGetBufferSize(VOID); -VOID MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y); -VOID MachVideoHideShowTextCursor(BOOLEAN Show); -VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); -VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer); -BOOLEAN MachVideoIsPaletteFixed(VOID); -VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); -VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue); -VOID MachVideoSync(VOID); -VOID MachBeep(VOID); -BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size); -BOOLEAN MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size); -BOOLEAN MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); -BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry); -ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber); -VOID MachPrepareForReactOS(IN BOOLEAN Setup); -VOID MachHwIdle(VOID); +/* NOTE: Implemented by each architecture */ +VOID MachInit(const char *CmdLine); -#define MachConsPutChar(Ch) MachVtbl.ConsPutChar(Ch) -#define MachConsKbHit() MachVtbl.ConsKbHit() -#define MachConsGetCh() MachVtbl.ConsGetCh() -#define MachVideoClearScreen(Attr) MachVtbl.VideoClearScreen(Attr) -#define MachVideoSetDisplayMode(Mode, Init) MachVtbl.VideoSetDisplayMode((Mode), (Init)) -#define MachVideoGetDisplaySize(W, H, D) MachVtbl.VideoGetDisplaySize((W), (H), (D)) -#define MachVideoGetBufferSize() MachVtbl.VideoGetBufferSize() -#define MachVideoSetTextCursorPosition(X, Y) MachVtbl.VideoSetTextCursorPosition((X), (Y)) -#define MachVideoHideShowTextCursor(Show) MachVtbl.VideoHideShowTextCursor(Show) -#define MachVideoPutChar(Ch, Attr, X, Y) MachVtbl.VideoPutChar((Ch), (Attr), (X), (Y)) -#define MachVideoCopyOffScreenBufferToVRAM(Buf) MachVtbl.VideoCopyOffScreenBufferToVRAM(Buf) -#define MachVideoIsPaletteFixed() MachVtbl.VideoIsPaletteFixed() -#define MachVideoSetPaletteColor(Col, R, G, B) MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B)) -#define MachVideoGetPaletteColor(Col, R, G, B) MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B)) -#define MachVideoSync() MachVtbl.VideoSync() -#define MachBeep() MachVtbl.Beep() -#define MachPrepareForReactOS(a) MachVtbl.PrepareForReactOS(a) -#define MachDiskGetBootPath(Path, Size) MachVtbl.DiskGetBootPath((Path), (Size)) -#define MachDiskNormalizeSystemPath(Path, Size) MachVtbl.DiskNormalizeSystemPath((Path), (Size)) -#define MachDiskReadLogicalSectors(Drive, Start, Count, Buf) MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf)) -#define MachDiskGetDriveGeometry(Drive, Geom) MachVtbl.DiskGetDriveGeometry((Drive), (Geom)) -#define MachDiskGetCacheableBlockCount(Drive) MachVtbl.DiskGetCacheableBlockCount(Drive) -#define MachInitializeBootDevices() MachVtbl.InitializeBootDevices() -#define MachHwDetect() MachVtbl.HwDetect() -#define MachHwIdle() MachVtbl.HwIdle() +#define MachConsPutChar(Ch) \ + MachVtbl.ConsPutChar(Ch) +#define MachConsKbHit() \ + MachVtbl.ConsKbHit() +#define MachConsGetCh() \ + MachVtbl.ConsGetCh() +#define MachVideoClearScreen(Attr) \ + MachVtbl.VideoClearScreen(Attr) +#define MachVideoSetDisplayMode(Mode, Init) \ + MachVtbl.VideoSetDisplayMode((Mode), (Init)) +#define MachVideoGetDisplaySize(W, H, D) \ + MachVtbl.VideoGetDisplaySize((W), (H), (D)) +#define MachVideoGetBufferSize() \ + MachVtbl.VideoGetBufferSize() +#define MachVideoSetTextCursorPosition(X, Y) \ + MachVtbl.VideoSetTextCursorPosition((X), (Y)) +#define MachVideoHideShowTextCursor(Show) \ + MachVtbl.VideoHideShowTextCursor(Show) +#define MachVideoPutChar(Ch, Attr, X, Y) \ + MachVtbl.VideoPutChar((Ch), (Attr), (X), (Y)) +#define MachVideoCopyOffScreenBufferToVRAM(Buf) \ + MachVtbl.VideoCopyOffScreenBufferToVRAM(Buf) +#define MachVideoIsPaletteFixed() \ + MachVtbl.VideoIsPaletteFixed() +#define MachVideoSetPaletteColor(Col, R, G, B) \ + MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B)) +#define MachVideoGetPaletteColor(Col, R, G, B) \ + MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B)) +#define MachVideoSync() \ + MachVtbl.VideoSync() +#define MachBeep() \ + MachVtbl.Beep() +#define MachPrepareForReactOS(Setup) \ + MachVtbl.PrepareForReactOS(Setup) +#define MachDiskGetBootPath(Path, Size) \ + MachVtbl.DiskGetBootPath((Path), (Size)) +#define MachDiskReadLogicalSectors(Drive, Start, Count, Buf) \ + MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf)) +#define MachDiskGetDriveGeometry(Drive, Geom) \ + MachVtbl.DiskGetDriveGeometry((Drive), (Geom)) +#define MachDiskGetCacheableBlockCount(Drive) \ + MachVtbl.DiskGetCacheableBlockCount(Drive) + +#define MachInitializeBootDevices() \ + MachVtbl.InitializeBootDevices() + +#define MachHwDetect() MachVtbl.HwDetect() +#define MachHwIdle() MachVtbl.HwIdle() /* ARC FUNCTIONS **************************************************************/ Modified: trunk/reactos/boot/freeldr/freeldr/machine.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -18,155 +18,7 @@ #include <freeldr.h> -#undef MachConsPutChar -#undef MachConsKbHit -#undef MachConsGetCh -#undef MachVideoClearScreen -#undef MachVideoSetDisplayMode -#undef MachVideoGetDisplaySize -#undef MachVideoGetBufferSize -#undef MachVideoSetTextCursorPosition -#undef MachVideoHideShowTextCursor -#undef MachVideoPutChar -#undef MachVideoCopyOffScreenBufferToVRAM -#undef MachVideoIsPaletteFixed -#undef MachVideoSetPaletteColor -#undef MachVideoGetPaletteColor -#undef MachVideoSync -#undef MachBeep -#undef MachPrepareForReactOS -#undef MachDiskGetBootPath -#undef MachDiskReadLogicalSectors -#undef MachDiskGetDriveGeometry -#undef MachDiskGetCacheableBlockCount - MACHVTBL MachVtbl; - -VOID -MachConsPutChar(int Ch) -{ - MachVtbl.ConsPutChar(Ch); -} - -BOOLEAN -MachConsKbHit(VOID) -{ - return MachVtbl.ConsKbHit(); -} - -int -MachConsGetCh(VOID) -{ - return MachVtbl.ConsGetCh(); -} - -VOID -MachVideoClearScreen(UCHAR Attr) -{ - MachVtbl.VideoClearScreen(Attr); -} - -VIDEODISPLAYMODE -MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init) -{ - return MachVtbl.VideoSetDisplayMode(DisplayMode, Init); -} - -VOID -MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth) -{ - MachVtbl.VideoGetDisplaySize(Width, Height, Depth); -} - -ULONG -MachVideoGetBufferSize(VOID) -{ - return MachVtbl.VideoGetBufferSize(); -} - -VOID -MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y) -{ - MachVtbl.VideoSetTextCursorPosition(X, Y); -} - -VOID -MachVideoHideShowTextCursor(BOOLEAN Show) -{ - MachVtbl.VideoHideShowTextCursor(Show); -} - -VOID -MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y) -{ - MachVtbl.VideoPutChar(Ch, Attr, X, Y); -} - -VOID -MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer) -{ - MachVtbl.VideoCopyOffScreenBufferToVRAM(Buffer); -} - -BOOLEAN -MachVideoIsPaletteFixed(VOID) -{ - return MachVtbl.VideoIsPaletteFixed(); -} - -VOID -MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) -{ - MachVtbl.VideoSetPaletteColor(Color, Red, Green, Blue); -} - -VOID -MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue) -{ - MachVtbl.VideoGetPaletteColor(Color, Red, Green, Blue); -} - -VOID -MachVideoSync(VOID) -{ - MachVtbl.VideoSync(); -} - -VOID -MachBeep(VOID) -{ - MachVtbl.Beep(); -} - -VOID -MachPrepareForReactOS(IN BOOLEAN Setup) -{ - MachVtbl.PrepareForReactOS(Setup); -} - -BOOLEAN -MachDiskGetBootPath(char *BootPath, unsigned Size) -{ - return MachVtbl.DiskGetBootPath(BootPath, Size); -} - -BOOLEAN -MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) -{ - return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); -} - -BOOLEAN -MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry) -{ - return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); -} - -ULONG -MachDiskGetCacheableBlockCount(UCHAR DriveNumber) -{ - return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); -} /* ARC FUNCTIONS **************************************************************/ Modified: trunk/reactos/boot/freeldr/freeldr/ntldr/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ntldr…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ntldr/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/ntldr/winldr.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -27,9 +27,9 @@ #include <debug.h> DBG_DEFAULT_CHANNEL(WINDOWS); -//FIXME: Find a better way to retrieve ARC disk information +// FIXME: Find a better way to retrieve ARC disk information extern ULONG reactos_disk_count; -extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; +extern ARC_DISK_SIGNATURE_EX reactos_arc_disk_info[]; extern ULONG LoaderPagesSpanned; extern BOOLEAN AcpiPresent; @@ -148,14 +148,10 @@ ArcDiskSig = FrLdrHeapAlloc(sizeof(ARC_DISK_SIGNATURE_EX), 'giSD'); /* Copy the data over */ - ArcDiskSig->DiskSignature.Signature = reactos_arc_disk_info[i].Signature; - ArcDiskSig->DiskSignature.CheckSum = reactos_arc_disk_info[i].CheckSum; - - /* Copy the ARC Name */ - strncpy(ArcDiskSig->ArcName, reactos_arc_disk_info[i].ArcName, MAX_PATH); + RtlCopyMemory(ArcDiskSig, &reactos_arc_disk_info[i], sizeof(ARC_DISK_SIGNATURE_EX)); + + /* Set the ARC Name pointer and mark the partition table as valid */ ArcDiskSig->DiskSignature.ArcName = PaToVa(ArcDiskSig->ArcName); - - /* Mark partition table as valid */ ArcDiskSig->DiskSignature.ValidPartitionTable = TRUE; /* Insert into the list */ @@ -176,8 +172,7 @@ /* Convert all DTE into virtual addresses */ List_PaToVa(&LoaderBlock->LoadOrderListHead); - /* this one will be converted right before switching to - virtual paging mode */ + /* This one will be converted right before switching to virtual paging mode */ //List_PaToVa(&LoaderBlock->MemoryDescriptorListHead); /* Convert list of boot drivers */ @@ -190,11 +185,12 @@ Extension->MinorVersion = VersionToBoot & 0xFF; Extension->Profile.Status = 2; - /* Check if ACPI is present */ + /* Check if FreeLdr detected a ACPI table */ if (AcpiPresent) { - /* See KiRosFrldrLpbToNtLpb for details */ + /* Set the pointer to something for compatibility */ Extension->AcpiTable = (PVOID)1; + // FIXME: Extension->AcpiTableSize; } #ifdef _M_IX86 @@ -700,10 +696,16 @@ UiDrawProgressBarCenter(15, 100, "Loading system hive..."); Success = WinLdrInitSystemHive(LoaderBlock, BootPath); TRACE("SYSTEM hive %s\n", (Success ? "loaded" : "not loaded")); + /* Bail out if failure */ + if (!Success) + return; /* Load NLS data, OEM font, and prepare boot drivers list */ Success = WinLdrScanSystemHive(LoaderBlock, BootPath); TRACE("SYSTEM hive %s\n", (Success ? "scanned" : "not scanned")); + /* Bail out if failure */ + if (!Success) + return; /* Finish loading */ LoadAndBootWindowsCommon(OperatingSystemVersion, Modified: trunk/reactos/boot/freeldr/freeldr/ntldr/wlregistry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ntldr…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ntldr/wlregistry.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/ntldr/wlregistry.c [iso-8859-1] Fri Jan 27 14:43:41 2017 @@ -178,7 +178,6 @@ TRACE("NLS data loading %s\n", Success ? "successful" : "failed"); /* TODO: Load OEM HAL font */ - return TRUE; }
7 years, 11 months
1
0
0
0
[akhaldi] 73605: [HIDPARSE][HIDPARSER][LIBUSB][USBHUB] Merge USB stack improvements by Vardan Mikayelyan in GSoC.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 11:09:36 2017 New Revision: 73605 URL:
http://svn.reactos.org/svn/reactos?rev=73605&view=rev
Log: [HIDPARSE][HIDPARSER][LIBUSB][USBHUB] Merge USB stack improvements by Vardan Mikayelyan in GSoC. Modified: trunk/reactos/ (props changed) trunk/reactos/drivers/hid/hidparse/ (props changed) trunk/reactos/drivers/hid/hidparse/hidparse.c trunk/reactos/drivers/usb/usbhub/ (props changed) trunk/reactos/drivers/usb/usbhub/CMakeLists.txt trunk/reactos/drivers/usb/usbhub/fdo.c trunk/reactos/drivers/usb/usbhub/misc.c trunk/reactos/drivers/usb/usbhub/pdo.c trunk/reactos/drivers/usb/usbhub/usbhub.c trunk/reactos/drivers/usb/usbhub/usbhub.h trunk/reactos/sdk/lib/drivers/hidparser/context.c trunk/reactos/sdk/lib/drivers/hidparser/hidparser.c trunk/reactos/sdk/lib/drivers/hidparser/parser.c trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp (contents, props changed) Propchange: trunk/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jan 27 11:09:36 2017 @@ -2,7 +2,7 @@ /branches/GSoC_2011/GSoC_TcpIpDriver:51550 /branches/GSoC_2011/TcpIpDriver:51551-53074,53076-53119 /branches/GSoC_2016/AHCI:71203-73603 -/branches/GSoC_2016/USB:72366,72376 +/branches/GSoC_2016/USB:72365-73604 /branches/GSoC_Network:51545-51546 /branches/cmake-bringup:50484,50693,50719,51544-52564 /branches/colins-printing-for-freedom/reactos:67543-68405,68407-68414,68417-70595 Propchange: trunk/reactos/drivers/hid/hidparse/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jan 27 11:09:36 2017 @@ -1,6 +1,7 @@ /branches/GSoC_2011/GSoC_Network/drivers/hid/hidparse:51548 /branches/GSoC_2011/GSoC_TcpIpDriver/drivers/hid/hidparse:51550 /branches/GSoC_2011/TcpIpDriver/drivers/hid/hidparse:51551-53074,53076-53119 +/branches/GSoC_2016/USB/drivers/hid/hidparse:72365-73604 /branches/GSoC_Network/drivers/hid/hidparse:51545-51546 /branches/cmake-bringup/drivers/hid/hidparse:50484,50693,50719,51544-52564 /branches/condrv_restructure/drivers/hid/hidparse:63104-64101 Modified: trunk/reactos/drivers/hid/hidparse/hidparse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidparse/hidpa…
============================================================================== --- trunk/reactos/drivers/hid/hidparse/hidparse.c [iso-8859-1] (original) +++ trunk/reactos/drivers/hid/hidparse/hidparse.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -126,6 +126,29 @@ } NTSTATUS +TranslateStatusForUpperLayer( + IN HIDPARSER_STATUS Status) +{ + // + // now we are handling only this values, for others just return + // status as it is. + // + switch (Status) + { + case HIDPARSER_STATUS_INSUFFICIENT_RESOURCES: + return STATUS_INSUFFICIENT_RESOURCES; + case HIDPARSER_STATUS_INVALID_REPORT_TYPE: + return HIDP_STATUS_INVALID_REPORT_TYPE; + case HIDPARSER_STATUS_BUFFER_TOO_SMALL: + return STATUS_BUFFER_TOO_SMALL; + case HIDPARSER_STATUS_COLLECTION_NOT_FOUND: + return STATUS_NO_DATA_DETECTED; + default: + return Status; + } +} + +NTSTATUS NTAPI HidP_GetCollectionDescription( IN PHIDP_REPORT_DESCRIPTOR ReportDesc, @@ -134,6 +157,7 @@ OUT PHIDP_DEVICE_DESC DeviceDescription) { HID_PARSER Parser; + NTSTATUS Status; // // init parser @@ -143,7 +167,8 @@ // // get description; // - return HidParser_GetCollectionDescription(&Parser, ReportDesc, DescLength, PoolType, DeviceDescription); + Status = HidParser_GetCollectionDescription(&Parser, ReportDesc, DescLength, PoolType, DeviceDescription); + return TranslateStatusForUpperLayer(Status); } HIDAPI Propchange: trunk/reactos/drivers/usb/usbhub/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jan 27 11:09:36 2017 @@ -4,7 +4,7 @@ /branches/GSoC_2011/GSoC_TcpIpDriver/drivers/usb/usbhub_new:51550 /branches/GSoC_2011/TcpIpDriver/drivers/usb/usbhub:51551-53074,53076-53119 /branches/GSoC_2011/TcpIpDriver/drivers/usb/usbhub_new:51551-53074,53076-53119 -/branches/GSoC_2016/USB/drivers/usb/usbhub:72366,72376 +/branches/GSoC_2016/USB/drivers/usb/usbhub:72365-73604 /branches/GSoC_Network/drivers/usb/usbhub:51545-51546 /branches/GSoC_Network/drivers/usb/usbhub_new:51545-51546 /branches/cmake-bringup/drivers/usb/usbhub:50484,50693,50719,51544-52564 Modified: trunk/reactos/drivers/usb/usbhub/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/CMakeLi…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/CMakeLists.txt [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -1,5 +1,6 @@ add_definitions(-DDEBUG_MODE) +add_definitions(-DNTDDI_VERSION=0x05020400) include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include) list(APPEND SOURCE Modified: trunk/reactos/drivers/usb/usbhub/fdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/fdo.c?r…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -568,6 +568,11 @@ Stack->Parameters.QueryInterface.Version = Version; Stack->Parameters.QueryInterface.Interface = Interface; Stack->Parameters.QueryInterface.InterfaceSpecificData = NULL; + + // + // Initialize the status block before sending the IRP + // + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; Status = IoCallDriver(DeviceObject, Irp); @@ -1089,8 +1094,7 @@ PDEVICE_OBJECT ChildDeviceObject = NULL; ULONG Index = 0; - DPRINT("Removing device on port %d (Child index: %d)\n", PortId, Index); - + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); for (Index = 0; Index < USB_MAXCHILDREN; Index++) { if (HubDeviceExtension->ChildDeviceObject[Index]) @@ -1111,11 +1115,16 @@ if (!ChildDeviceObject) { DPRINT1("Removal request for non-existant device!\n"); + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); return STATUS_UNSUCCESSFUL; } + + DPRINT("Removing device on port %d (Child index: %d)\n", PortId, Index); /* Remove the device from the table */ HubDeviceExtension->ChildDeviceObject[Index] = NULL; + + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); /* Invalidate device relations for the root hub */ IoInvalidateDeviceRelations(HubDeviceExtension->RootHubPhysicalDeviceObject, BusRelations); @@ -1147,26 +1156,6 @@ HubInterface = &HubDeviceExtension->HubInterface; RootHubDeviceObject = HubDeviceExtension->RootHubPhysicalDeviceObject; HubInterfaceBusContext = HubDeviceExtension->UsbDInterface.BusContext; - // - // Find an empty slot in the child device array - // - for (ChildDeviceCount = 0; ChildDeviceCount < USB_MAXCHILDREN; ChildDeviceCount++) - { - if (HubDeviceExtension->ChildDeviceObject[ChildDeviceCount] == NULL) - { - DPRINT("Found unused entry at %d\n", ChildDeviceCount); - break; - } - } - - // - // Check if the limit has been reached for maximum usb devices - // - if (ChildDeviceCount == USB_MAXCHILDREN) - { - DPRINT1("USBHUB: Too many child devices!\n"); - return STATUS_UNSUCCESSFUL; - } while (TRUE) { @@ -1226,10 +1215,6 @@ UsbChildExtension->ParentDeviceObject = UsbHubDeviceObject; UsbChildExtension->PortNumber = PortId; - // copy device interface - RtlCopyMemory(&UsbChildExtension->DeviceInterface, &HubDeviceExtension->DeviceInterface, sizeof(USB_BUS_INTERFACE_USBDI_V2)); - - // // Create the UsbDeviceObject // @@ -1243,12 +1228,6 @@ DPRINT1("USBHUB: CreateUsbDevice failed with status %x\n", Status); goto Cleanup; } - - // copy device interface - RtlCopyMemory(&UsbChildExtension->DeviceInterface, &HubDeviceExtension->DeviceInterface, sizeof(USB_BUS_INTERFACE_USBDI_V2)); - - // FIXME replace buscontext - UsbChildExtension->DeviceInterface.BusContext = UsbChildExtension->UsbDeviceHandle; // // Initialize UsbDevice @@ -1339,8 +1318,43 @@ goto Cleanup; } + // copy device interface + RtlCopyMemory(&UsbChildExtension->DeviceInterface, &HubDeviceExtension->UsbDInterface, sizeof(USB_BUS_INTERFACE_USBDI_V2)); + UsbChildExtension->DeviceInterface.InterfaceReference(UsbChildExtension->DeviceInterface.BusContext); + + INITIALIZE_PNP_STATE(UsbChildExtension->Common); + + IoInitializeRemoveLock(&UsbChildExtension->Common.RemoveLock, 'pbuH', 0, 0); + + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); + + // + // Find an empty slot in the child device array + // + for (ChildDeviceCount = 0; ChildDeviceCount < USB_MAXCHILDREN; ChildDeviceCount++) + { + if (HubDeviceExtension->ChildDeviceObject[ChildDeviceCount] == NULL) + { + DPRINT("Found unused entry at %d\n", ChildDeviceCount); + break; + } + } + + // + // Check if the limit has been reached for maximum usb devices + // + if (ChildDeviceCount == USB_MAXCHILDREN) + { + DPRINT1("USBHUB: Too many child devices!\n"); + Status = STATUS_UNSUCCESSFUL; + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + UsbChildExtension->DeviceInterface.InterfaceDereference(UsbChildExtension->DeviceInterface.BusContext); + goto Cleanup; + } + HubDeviceExtension->ChildDeviceObject[ChildDeviceCount] = NewChildDeviceObject; HubDeviceExtension->InstanceCount++; + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); IoInvalidateDeviceRelations(RootHubDeviceObject, BusRelations); return STATUS_SUCCESS; @@ -1384,16 +1398,20 @@ NTSTATUS USBHUB_FdoQueryBusRelations( IN PDEVICE_OBJECT DeviceObject, + IN PDEVICE_RELATIONS RelationsFromTop, OUT PDEVICE_RELATIONS* pDeviceRelations) { PHUB_DEVICE_EXTENSION HubDeviceExtension; PDEVICE_RELATIONS DeviceRelations; ULONG i; + ULONG ChildrenFromTop = 0; ULONG Children = 0; ULONG NeededSize; HubDeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); + // // Count the number of children // @@ -1407,9 +1425,19 @@ Children++; } - NeededSize = sizeof(DEVICE_RELATIONS); - if (Children > 1) - NeededSize += (Children - 1) * sizeof(PDEVICE_OBJECT); + if (RelationsFromTop) + { + ChildrenFromTop = RelationsFromTop->Count; + if (!Children) + { + // We have nothing to add + *pDeviceRelations = RelationsFromTop; + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + return STATUS_SUCCESS; + } + } + + NeededSize = sizeof(DEVICE_RELATIONS) + (Children + ChildrenFromTop - 1) * sizeof(PDEVICE_OBJECT); // // Allocate DeviceRelations @@ -1418,9 +1446,22 @@ NeededSize); if (!DeviceRelations) - return STATUS_INSUFFICIENT_RESOURCES; - DeviceRelations->Count = Children; - Children = 0; + { + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + if (!RelationsFromTop) + return STATUS_INSUFFICIENT_RESOURCES; + else + return STATUS_NOT_SUPPORTED; + } + // Copy the objects coming from top + if (ChildrenFromTop) + { + RtlCopyMemory(DeviceRelations->Objects, RelationsFromTop->Objects, + ChildrenFromTop * sizeof(PDEVICE_OBJECT)); + } + + DeviceRelations->Count = Children + ChildrenFromTop; + Children = ChildrenFromTop; // // Fill in return structure @@ -1429,11 +1470,18 @@ { if (HubDeviceExtension->ChildDeviceObject[i]) { + // The PnP Manager removes the reference when appropriate. ObReferenceObject(HubDeviceExtension->ChildDeviceObject[i]); HubDeviceExtension->ChildDeviceObject[i]->Flags &= ~DO_DEVICE_INITIALIZING; DeviceRelations->Objects[Children++] = HubDeviceExtension->ChildDeviceObject[i]; } } + + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + + // We should do this, because replaced this with our's one + if (RelationsFromTop) + ExFreePool(RelationsFromTop); ASSERT(Children == DeviceRelations->Count); *pDeviceRelations = DeviceRelations; @@ -1551,7 +1599,8 @@ if (!Urb) { // no memory - return STATUS_INSUFFICIENT_RESOURCES; + Status = STATUS_INSUFFICIENT_RESOURCES; + goto cleanup; } // zero urb @@ -1566,8 +1615,7 @@ { // failed to obtain hub pdo DPRINT1("IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO failed with %x\n", Status); - ExFreePool(Urb); - return Status; + goto cleanup; } // sanity checks @@ -1578,14 +1626,13 @@ RootHubDeviceObject = HubDeviceExtension->RootHubPhysicalDeviceObject; // Send the StartDevice to RootHub - Status = ForwardIrpAndWait(RootHubDeviceObject, Irp); + Status = ForwardIrpAndWait(HubDeviceExtension->LowerDeviceObject, Irp); if (!NT_SUCCESS(Status)) { // failed to start pdo DPRINT1("Failed to start the RootHub PDO\n"); - ExFreePool(Urb); - return Status; + goto cleanup; } // Get the current number of hubs @@ -1596,8 +1643,7 @@ { // failed to get number of hubs DPRINT1("IOCTL_INTERNAL_USB_GET_HUB_COUNT failed with %x\n", Status); - ExFreePool(Urb); - return Status; + goto cleanup; } // Get the Hub Interface @@ -1611,8 +1657,7 @@ { // failed to get root hub interface DPRINT1("Failed to get HUB_GUID interface with status 0x%08lx\n", Status); - ExFreePool(Urb); - return Status; + goto cleanup; } HubInterfaceBusContext = HubDeviceExtension->HubInterface.BusContext; @@ -1628,8 +1673,7 @@ { // failed to get usbdi interface DPRINT1("Failed to get USBDI_GUID interface with status 0x%08lx\n", Status); - ExFreePool(Urb); - return Status; + goto cleanup; } // Get Root Hub Device Handle @@ -1642,8 +1686,7 @@ { // failed DPRINT1("IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE failed with status 0x%08lx\n", Status); - ExFreePool(Urb); - return Status; + goto cleanup; } // @@ -1687,8 +1730,7 @@ { // failed to get device descriptor of hub DPRINT1("Failed to get HubDeviceDescriptor!\n"); - ExFreePool(Urb); - return Status; + goto cleanup; } // build configuration request @@ -1715,8 +1757,7 @@ { // failed to get configuration descriptor DPRINT1("Failed to get RootHub Configuration with status %x\n", Status); - ExFreePool(Urb); - return Status; + goto cleanup; } // sanity checks @@ -1742,16 +1783,15 @@ { // failed to get hub information DPRINT1("Failed to extended hub information. Unable to determine the number of ports!\n"); - ExFreePool(Urb); - return Status; + goto cleanup; } if (!HubDeviceExtension->UsbExtHubInfo.NumberOfPorts) { // bogus port driver DPRINT1("Failed to retrieve the number of ports\n"); - ExFreePool(Urb); - return STATUS_UNSUCCESSFUL; + Status = STATUS_UNSUCCESSFUL; + goto cleanup; } DPRINT("HubDeviceExtension->UsbExtHubInfo.NumberOfPorts %x\n", HubDeviceExtension->UsbExtHubInfo.NumberOfPorts); @@ -1782,8 +1822,8 @@ if (!NT_SUCCESS(Status)) { DPRINT1("Failed to get Hub Descriptor!\n"); - ExFreePool(Urb); - return STATUS_UNSUCCESSFUL; + Status = STATUS_UNSUCCESSFUL; + goto cleanup; } // sanity checks @@ -1811,14 +1851,21 @@ { // failed to get hub status DPRINT1("Failed to get Hub Status!\n"); - ExFreePool(Urb); - return STATUS_UNSUCCESSFUL; + Status = STATUS_UNSUCCESSFUL; + goto cleanup; } // Allocate memory for PortStatusChange to hold 2 USHORTs for each port on hub HubDeviceExtension->PortStatusChange = ExAllocatePoolWithTag(NonPagedPool, sizeof(ULONG) * HubDeviceExtension->UsbExtHubInfo.NumberOfPorts, USB_HUB_TAG); + + if (!HubDeviceExtension->PortStatusChange) + { + DPRINT1("Failed to allocate pool for PortStatusChange!\n"); + Status = STATUS_INSUFFICIENT_RESOURCES; + goto cleanup; + } // Get the first Configuration Descriptor Pid = USBD_ParseConfigurationDescriptorEx(&HubDeviceExtension->HubConfigDescriptor, @@ -1828,8 +1875,8 @@ { // failed parse hub descriptor DPRINT1("Failed to parse configuration descriptor\n"); - ExFreePool(Urb); - return STATUS_UNSUCCESSFUL; + Status = STATUS_UNSUCCESSFUL; + goto cleanup; } // create configuration request @@ -1840,8 +1887,8 @@ { // failed to build urb DPRINT1("Failed to allocate urb\n"); - ExFreePool(Urb); - return STATUS_INSUFFICIENT_RESOURCES; + Status = STATUS_INSUFFICIENT_RESOURCES; + goto cleanup; } // send request @@ -1853,9 +1900,7 @@ { // failed to select configuration DPRINT1("Failed to select configuration with %x\n", Status); - ExFreePool(Urb); - ExFreePool(ConfigUrb); - return Status; + goto cleanup; } // store configuration & pipe handle @@ -1863,12 +1908,6 @@ HubDeviceExtension->PipeHandle = ConfigUrb->UrbSelectConfiguration.Interface.Pipes[0].PipeHandle; DPRINT("Configuration Handle %x\n", HubDeviceExtension->ConfigurationHandle); - FDO_QueryInterface(DeviceObject, &HubDeviceExtension->DeviceInterface); - - - // free urb - ExFreePool(ConfigUrb); - // check if function is available if (HubDeviceExtension->UsbDInterface.IsDeviceHighSpeed) { @@ -1908,8 +1947,7 @@ if (!NT_SUCCESS(Status)) { DPRINT1("Failed to set callback\n"); - ExFreePool(Urb); - return Status; + goto cleanup; } } else @@ -1961,7 +1999,29 @@ // free urb ExFreePool(Urb); + // free ConfigUrb + ExFreePool(ConfigUrb); + // done + return Status; + +cleanup: + if (Urb) + ExFreePool(Urb); + + // Dereference interfaces + if (HubDeviceExtension->HubInterface.Size) + HubDeviceExtension->HubInterface.InterfaceDereference(HubDeviceExtension->HubInterface.BusContext); + + if (HubDeviceExtension->UsbDInterface.Size) + HubDeviceExtension->UsbDInterface.InterfaceDereference(HubDeviceExtension->UsbDInterface.BusContext); + + if (HubDeviceExtension->PortStatusChange) + ExFreePool(HubDeviceExtension->PortStatusChange); + + if (ConfigUrb) + ExFreePool(ConfigUrb); + return Status; } @@ -1972,17 +2032,31 @@ { PIO_STACK_LOCATION Stack; NTSTATUS Status = STATUS_SUCCESS; - ULONG_PTR Information = 0; + PDEVICE_OBJECT ChildDeviceObject; PHUB_DEVICE_EXTENSION HubDeviceExtension; + PUSB_BUS_INTERFACE_HUB_V5 HubInterface; + PHUB_CHILDDEVICE_EXTENSION ChildDeviceExtension; HubDeviceExtension = (PHUB_DEVICE_EXTENSION) DeviceObject->DeviceExtension; + HubInterface = &HubDeviceExtension->HubInterface; Stack = IoGetCurrentIrpStackLocation(Irp); + Status = IoAcquireRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); + if (!NT_SUCCESS(Status)) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } + switch (Stack->MinorFunction) { + int i; + case IRP_MN_START_DEVICE: { + DPRINT("IRP_MN_START_DEVICE\n"); if (USBHUB_IsRootHubFDO(DeviceObject)) { // start root hub fdo @@ -1992,7 +2066,13 @@ { Status = USBHUB_ParentFDOStartDevice(DeviceObject, Irp); } - break; + + SET_NEW_PNP_STATE(HubDeviceExtension->Common, Started); + + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoReleaseRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); + return Status; } case IRP_MN_QUERY_DEVICE_RELATIONS: @@ -2002,66 +2082,197 @@ case BusRelations: { PDEVICE_RELATIONS DeviceRelations = NULL; + PDEVICE_RELATIONS RelationsFromTop = (PDEVICE_RELATIONS)Irp->IoStatus.Information; DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); - Status = USBHUB_FdoQueryBusRelations(DeviceObject, &DeviceRelations); - - Information = (ULONG_PTR)DeviceRelations; + Status = USBHUB_FdoQueryBusRelations(DeviceObject, RelationsFromTop, &DeviceRelations); + + if (!NT_SUCCESS(Status)) + { + if (Status == STATUS_NOT_SUPPORTED) + { + // We should process this to not lose relations from top. + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + } + // We should fail an IRP + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoReleaseRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); + return Status; + } + + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + Irp->IoStatus.Status = Status; break; } case RemovalRelations: { DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); - return ForwardIrpAndForget(DeviceObject, Irp); + break; } default: DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", Stack->Parameters.QueryDeviceRelations.Type); - return ForwardIrpAndForget(DeviceObject, Irp); + break; } break; } + case IRP_MN_QUERY_STOP_DEVICE: + { + // + // We should fail this request, because we're not handling + // IRP_MN_STOP_DEVICE for now.We'll receive this IRP ONLY when + // PnP manager rebalances resources. + // + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_SUPPORTED; + } case IRP_MN_QUERY_REMOVE_DEVICE: - case IRP_MN_QUERY_STOP_DEVICE: - { + { + // No action is required from FDO because it have nothing to free. + DPRINT("IRP_MN_QUERY_REMOVE_DEVICE\n"); + + SET_NEW_PNP_STATE(HubDeviceExtension->Common, RemovePending); + Irp->IoStatus.Status = STATUS_SUCCESS; - return ForwardIrpAndForget(DeviceObject, Irp); + break; + } + case IRP_MN_CANCEL_REMOVE_DEVICE: + { + DPRINT("IRP_MN_CANCEL_REMOVE_DEVICE\n"); + + if (HubDeviceExtension->Common.PnPState == RemovePending) + RESTORE_PREVIOUS_PNP_STATE(HubDeviceExtension->Common); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + } + case IRP_MN_SURPRISE_REMOVAL: + { + // + // We'll receive this IRP on HUB unexpected removal, or on USB + // controller removal from PCI port. Here we should "let know" all + // our children that their parent is removed and on next removal + // they also can be removed. + // + SET_NEW_PNP_STATE(HubDeviceExtension->Common, SurpriseRemovePending); + + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); + + for (i = 0; i < USB_MAXCHILDREN; i++) + { + ChildDeviceObject = HubDeviceExtension->ChildDeviceObject[i]; + if (ChildDeviceObject) + { + ChildDeviceExtension = (PHUB_CHILDDEVICE_EXTENSION)ChildDeviceObject->DeviceObjectExtension; + ChildDeviceExtension->ParentDeviceObject = NULL; + } + } + + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + + // This IRP can't be failed + Irp->IoStatus.Status = STATUS_SUCCESS; + break; } case IRP_MN_REMOVE_DEVICE: { + DPRINT("IRP_MN_REMOVE_DEVICE\n"); + + SET_NEW_PNP_STATE(HubDeviceExtension->Common, Deleted); + + IoReleaseRemoveLockAndWait(&HubDeviceExtension->Common.RemoveLock, Irp); + + // + // Here we should remove all child PDOs. At this point all children + // received and returned from IRP_MN_REMOVE so remove synchronization + // isn't needed here + // + + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); + + for (i = 0; i < USB_MAXCHILDREN; i++) + { + ChildDeviceObject = HubDeviceExtension->ChildDeviceObject[i]; + if (ChildDeviceObject) + { + PHUB_CHILDDEVICE_EXTENSION UsbChildExtension = (PHUB_CHILDDEVICE_EXTENSION)ChildDeviceObject->DeviceExtension; + + SET_NEW_PNP_STATE(UsbChildExtension->Common, Deleted); + + // Remove the usb device + if (UsbChildExtension->UsbDeviceHandle) + { + Status = HubInterface->RemoveUsbDevice(HubInterface->BusContext, UsbChildExtension->UsbDeviceHandle, 0); + ASSERT(Status == STATUS_SUCCESS); + } + + // Free full configuration descriptor + if (UsbChildExtension->FullConfigDesc) + ExFreePool(UsbChildExtension->FullConfigDesc); + + // Free ID buffers + if (UsbChildExtension->usCompatibleIds.Buffer) + ExFreePool(UsbChildExtension->usCompatibleIds.Buffer); + + if (UsbChildExtension->usDeviceId.Buffer) + ExFreePool(UsbChildExtension->usDeviceId.Buffer); + + if (UsbChildExtension->usHardwareIds.Buffer) + ExFreePool(UsbChildExtension->usHardwareIds.Buffer); + + if (UsbChildExtension->usInstanceId.Buffer) + ExFreePool(UsbChildExtension->usInstanceId.Buffer); + + DPRINT("Deleting child PDO\n"); + IoDeleteDevice(DeviceObject); + ChildDeviceObject = NULL; + } + } + + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + Status = ForwardIrpAndForget(DeviceObject, Irp); IoDetachDevice(HubDeviceExtension->LowerDeviceObject); + DPRINT("Deleting FDO 0x%p\n", DeviceObject); IoDeleteDevice(DeviceObject); - return STATUS_SUCCESS; + return Status; } case IRP_MN_QUERY_BUS_INFORMATION: { + // Function drivers and filter drivers do not handle this IRP. DPRINT("IRP_MN_QUERY_BUS_INFORMATION\n"); break; } case IRP_MN_QUERY_ID: { DPRINT("IRP_MN_QUERY_ID\n"); + // Function drivers and filter drivers do not handle this IRP. break; } case IRP_MN_QUERY_CAPABILITIES: { + // + // If a function or filter driver does not handle this IRP, it + // should pass that down. + // DPRINT("IRP_MN_QUERY_CAPABILITIES\n"); break; } default: { DPRINT(" IRP_MJ_PNP / unknown minor function 0x%lx\n", Stack->MinorFunction); - return ForwardIrpAndForget(DeviceObject, Irp); - } - } - - Irp->IoStatus.Information = Information; - Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + break; + } + } + + Status = ForwardIrpAndForget(DeviceObject, Irp); + IoReleaseRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); return Status; } @@ -2086,6 +2297,25 @@ // get device extension HubDeviceExtension = (PHUB_DEVICE_EXTENSION) DeviceObject->DeviceExtension; + Status = IoAcquireRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); + if (!NT_SUCCESS(Status)) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } + + // Prevent handling of control requests in remove pending state + if (HubDeviceExtension->Common.PnPState == RemovePending) + { + DPRINT1("[USBHUB] Request for removed device object %p\n", DeviceObject); + Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED; + Irp->IoStatus.Information = 0; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoReleaseRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); + return STATUS_DEVICE_NOT_CONNECTED; + } + if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_USB_GET_NODE_INFORMATION) { // is the buffer big enough @@ -2131,6 +2361,7 @@ // sanity checks ASSERT(NodeConnectionInfo); + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); for(Index = 0; Index < USB_MAXCHILDREN; Index++) { if (HubDeviceExtension->ChildDeviceObject[Index] == NULL) @@ -2157,6 +2388,7 @@ } break; } + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); // done Irp->IoStatus.Information = sizeof(USB_NODE_INFORMATION); Status = STATUS_SUCCESS; @@ -2177,6 +2409,7 @@ // sanity checks ASSERT(NodeKey); + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); for(Index = 0; Index < USB_MAXCHILDREN; Index++) { if (HubDeviceExtension->ChildDeviceObject[Index] == NULL) @@ -2216,6 +2449,7 @@ NodeKey->ActualLength = Length + sizeof(USB_NODE_CONNECTION_DRIVERKEY_NAME); break; } + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); } } else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_USB_GET_NODE_CONNECTION_NAME) @@ -2247,6 +2481,7 @@ Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoReleaseRemoveLock(&HubDeviceExtension->Common.RemoveLock, Irp); return Status; } Modified: trunk/reactos/drivers/usb/usbhub/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/misc.c?…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/misc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/misc.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -211,84 +211,3 @@ return Status; } - -NTSTATUS -NTAPI -FDO_QueryInterfaceCompletionRoutine( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PVOID Context) -{ - /* Set event */ - KeSetEvent((PRKEVENT)Context, 0, FALSE); - - /* Completion is done in the HidClassFDO_QueryCapabilities routine */ - return STATUS_MORE_PROCESSING_REQUIRED; -} - -NTSTATUS -FDO_QueryInterface( - IN PDEVICE_OBJECT DeviceObject, - IN OUT PUSB_BUS_INTERFACE_USBDI_V2 Interface) -{ - PIRP Irp; - KEVENT Event; - NTSTATUS Status; - PIO_STACK_LOCATION IoStack; - PHUB_DEVICE_EXTENSION HubDeviceExtension; - - /* Get device extension */ - HubDeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - ASSERT(HubDeviceExtension->Common.IsFDO); - - /* Init event */ - KeInitializeEvent(&Event, NotificationEvent, FALSE); - - /* Now allocate the irp */ - Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE); - if (!Irp) - { - /* No memory */ - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* Get next stack location */ - IoStack = IoGetNextIrpStackLocation(Irp); - - /* Init stack location */ - IoStack->MajorFunction = IRP_MJ_PNP; - IoStack->MinorFunction = IRP_MN_QUERY_INTERFACE; - IoStack->Parameters.QueryInterface.Interface = (PINTERFACE)Interface; - IoStack->Parameters.QueryInterface.InterfaceType = &USB_BUS_INTERFACE_USBDI_GUID; - IoStack->Parameters.QueryInterface.Version = USB_BUSIF_USBDI_VERSION_2; - IoStack->Parameters.QueryInterface.Size = sizeof(USB_BUS_INTERFACE_USBDI_V2); - - - /* Set completion routine */ - IoSetCompletionRoutine(Irp, - FDO_QueryInterfaceCompletionRoutine, - (PVOID)&Event, - TRUE, - TRUE, - TRUE); - - /* Pnp irps have default completion code */ - Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; - - /* Call lower device */ - Status = IoCallDriver(HubDeviceExtension->LowerDeviceObject, Irp); - if (Status == STATUS_PENDING) - { - /* Wait for completion */ - KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); - } - - /* Get status */ - Status = Irp->IoStatus.Status; - - /* Complete request */ - IoFreeIrp(Irp); - - /* Done */ - return Status; -} Modified: trunk/reactos/drivers/usb/usbhub/pdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/pdo.c?r…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/pdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/pdo.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -146,16 +146,25 @@ ChildDeviceExtension = (PHUB_CHILDDEVICE_EXTENSION)DeviceObject->DeviceExtension; ASSERT(ChildDeviceExtension->Common.IsFDO == FALSE); + + // This can happen when parent device was surprise removed. + if (ChildDeviceExtension->ParentDeviceObject == NULL) + return FALSE; + HubDeviceExtension = (PHUB_DEVICE_EXTENSION)ChildDeviceExtension->ParentDeviceObject->DeviceExtension; + KeAcquireGuardedMutex(&HubDeviceExtension->HubMutexLock); for(Index = 0; Index < USB_MAXCHILDREN; Index++) { if (HubDeviceExtension->ChildDeviceObject[Index] == DeviceObject) { + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); + /* PDO exists */ return TRUE; } } + KeReleaseGuardedMutex(&HubDeviceExtension->HubMutexLock); /* invalid pdo */ return FALSE; @@ -190,17 +199,30 @@ ChildDeviceExtension = (PHUB_CHILDDEVICE_EXTENSION)DeviceObject->DeviceExtension; ASSERT(ChildDeviceExtension->Common.IsFDO == FALSE); - HubDeviceExtension = (PHUB_DEVICE_EXTENSION)ChildDeviceExtension->ParentDeviceObject->DeviceExtension; - RootHubDeviceObject = HubDeviceExtension->RootHubPhysicalDeviceObject; - - if(!IsValidPDO(DeviceObject)) - { + + Status = IoAcquireRemoveLock(&ChildDeviceExtension->Common.RemoveLock, Irp); + if (!NT_SUCCESS(Status)) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } + + if (ChildDeviceExtension->Common.PnPState == SurpriseRemovePending || + ChildDeviceExtension->Common.PnPState == RemovePending || + ChildDeviceExtension->ParentDeviceObject == NULL) + { + // Parent or child device was surprise removed. DPRINT1("[USBHUB] Request for removed device object %p\n", DeviceObject); Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED; Irp->IoStatus.Information = 0; IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoReleaseRemoveLock(&ChildDeviceExtension->Common.RemoveLock, Irp); return STATUS_DEVICE_NOT_CONNECTED; } + + HubDeviceExtension = (PHUB_DEVICE_EXTENSION)ChildDeviceExtension->ParentDeviceObject->DeviceExtension; + RootHubDeviceObject = HubDeviceExtension->RootHubPhysicalDeviceObject; switch (Stack->Parameters.DeviceIoControl.IoControlCode) { @@ -301,6 +323,7 @@ // Send the request to RootHub // Status = ForwardUrbToRootHub(RootHubDeviceObject, IOCTL_INTERNAL_USB_SUBMIT_URB, Irp, Urb, NULL); + IoReleaseRemoveLock(&ChildDeviceExtension->Common.RemoveLock, Irp); return Status; } // @@ -397,6 +420,7 @@ Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); } + IoReleaseRemoveLock(&ChildDeviceExtension->Common.RemoveLock, Irp); return Status; } @@ -420,6 +444,8 @@ // IoRegisterDeviceInterface(DeviceObject, &GUID_DEVINTERFACE_USB_DEVICE, NULL, &ChildDeviceExtension->SymbolicLinkName); IoSetDeviceInterfaceState(&ChildDeviceExtension->SymbolicLinkName, TRUE); + + SET_NEW_PNP_STATE(ChildDeviceExtension->Common, Started); UNIMPLEMENTED return STATUS_SUCCESS; @@ -563,14 +589,19 @@ PIO_STACK_LOCATION Stack; ULONG_PTR Information = 0; PHUB_CHILDDEVICE_EXTENSION UsbChildExtension; - ULONG Index; - ULONG bFound; PDEVICE_RELATIONS DeviceRelation; - PDEVICE_OBJECT ParentDevice; UsbChildExtension = (PHUB_CHILDDEVICE_EXTENSION)DeviceObject->DeviceExtension; Stack = IoGetCurrentIrpStackLocation(Irp); MinorFunction = Stack->MinorFunction; + + Status = IoAcquireRemoveLock(&UsbChildExtension->Common.RemoveLock, Irp); + if (!NT_SUCCESS(Status)) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } switch (MinorFunction) { @@ -628,17 +659,20 @@ } case IRP_MN_QUERY_DEVICE_TEXT: { + DPRINT("IRP_MN_QUERY_DEVICE_TEXT\n"); Status = USBHUB_PdoQueryDeviceText(DeviceObject, Irp, &Information); break; } case IRP_MN_QUERY_ID: { + DPRINT("IRP_MN_QUERY_ID\n"); Status = USBHUB_PdoQueryId(DeviceObject, Irp, &Information); break; } case IRP_MN_QUERY_BUS_INFORMATION: { PPNP_BUS_INFORMATION BusInfo; + DPRINT("IRP_MN_QUERY_BUS_INFORMATION\n"); BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION)); RtlCopyMemory(&BusInfo->BusTypeGuid, &GUID_BUS_TYPE_USB, @@ -654,42 +688,58 @@ { PHUB_DEVICE_EXTENSION HubDeviceExtension = (PHUB_DEVICE_EXTENSION)UsbChildExtension->ParentDeviceObject->DeviceExtension; PUSB_BUS_INTERFACE_HUB_V5 HubInterface = &HubDeviceExtension->HubInterface; - ParentDevice = UsbChildExtension->ParentDeviceObject; DPRINT("IRP_MJ_PNP / IRP_MN_REMOVE_DEVICE\n"); - /* remove us from pdo list */ - bFound = FALSE; - for(Index = 0; Index < USB_MAXCHILDREN; Index++) - { - if (HubDeviceExtension->ChildDeviceObject[Index] == DeviceObject) + ASSERT((UsbChildExtension->Common.PnPState == RemovePending) || + (UsbChildExtension->Common.PnPState == SurpriseRemovePending)); + + SET_NEW_PNP_STATE(UsbChildExtension->Common, NotStarted); + + if (!IsValidPDO(DeviceObject)) + { + // Parent or child device was surprise removed, freeing resources allocated for child device. + SET_NEW_PNP_STATE(UsbChildExtension->Common, Deleted); + + IoReleaseRemoveLockAndWait(&UsbChildExtension->Common.RemoveLock, Irp); + + // Remove the usb device + if (UsbChildExtension->UsbDeviceHandle) { - /* Remove the device */ - Status = HubInterface->RemoveUsbDevice(HubDeviceExtension->UsbDInterface.BusContext, UsbChildExtension->UsbDeviceHandle, 0); - - /* FIXME handle error */ - ASSERT(Status == STATUS_SUCCESS); - - /* remove us */ - HubDeviceExtension->ChildDeviceObject[Index] = NULL; - bFound = TRUE; - break; + Status = HubInterface->RemoveUsbDevice(HubInterface->BusContext, UsbChildExtension->UsbDeviceHandle, 0); + ASSERT(Status == STATUS_SUCCESS); } - } + // Free full configuration descriptor + if (UsbChildExtension->FullConfigDesc) + ExFreePool(UsbChildExtension->FullConfigDesc); + + // Free ID buffers + if (UsbChildExtension->usCompatibleIds.Buffer) + ExFreePool(UsbChildExtension->usCompatibleIds.Buffer); + + if (UsbChildExtension->usDeviceId.Buffer) + ExFreePool(UsbChildExtension->usDeviceId.Buffer); + + if (UsbChildExtension->usHardwareIds.Buffer) + ExFreePool(UsbChildExtension->usHardwareIds.Buffer); + + if (UsbChildExtension->usInstanceId.Buffer) + ExFreePool(UsbChildExtension->usInstanceId.Buffer); + + DPRINT("Deleting child PDO\n"); + IoDeleteDevice(DeviceObject); + } + else + { + IoReleaseRemoveLock(&UsbChildExtension->Common.RemoveLock, Irp); + } + + // If device is physically presented, we leave its PDO undeleted. /* Complete the IRP */ Irp->IoStatus.Status = STATUS_SUCCESS; IoCompleteRequest(Irp, IO_NO_INCREMENT); - /* delete device */ - IoDeleteDevice(DeviceObject); - - if (bFound) - { - /* invalidate device relations */ - IoInvalidateDeviceRelations(ParentDevice, BusRelations); - } - return STATUS_SUCCESS; } case IRP_MN_QUERY_DEVICE_RELATIONS: @@ -699,6 +749,7 @@ { /* not supported */ Status = Irp->IoStatus.Status; + Information = Irp->IoStatus.Information; break; } @@ -722,13 +773,46 @@ break; } case IRP_MN_QUERY_STOP_DEVICE: + { + // + // We should fail this request, because we're not handling IRP_MN_STOP_DEVICE for now. + // We'll receive this IRP ONLY when the PnP manager rebalances resources. + // + Status = STATUS_NOT_SUPPORTED; + break; + } case IRP_MN_QUERY_REMOVE_DEVICE: { + // + // Free interface obtained from bottom, according MSDN we should + // check interfaces provided to top, but here we are not checking. + // All checking will be performed in roothub driver's + // IRP_MN_QUERY_REMOVE_DEVICE handler. This will make problems when + // buggy driver is loaded on top of us. But we decided to keep source + // simpler, because in any case buggy driver will prevent removing of + // whole stack. + // + UsbChildExtension->DeviceInterface.InterfaceDereference(UsbChildExtension->DeviceInterface.BusContext); + + SET_NEW_PNP_STATE(UsbChildExtension->Common, RemovePending); + /* Sure, no problem */ Status = STATUS_SUCCESS; Information = 0; break; } + case IRP_MN_CANCEL_REMOVE_DEVICE: + { + // Check to see have we received query-remove before + if (UsbChildExtension->Common.PnPState == RemovePending) + { + RESTORE_PREVIOUS_PNP_STATE(UsbChildExtension->Common); + UsbChildExtension->DeviceInterface.InterfaceReference(UsbChildExtension->DeviceInterface.BusContext); + } + + Status = STATUS_SUCCESS; + break; + } case IRP_MN_QUERY_INTERFACE: { DPRINT1("IRP_MN_QUERY_INTERFACE\n"); @@ -736,17 +820,28 @@ { DPRINT1("USB_BUS_INTERFACE_USBDI_GUID\n"); RtlCopyMemory(Stack->Parameters.QueryInterface.Interface, &UsbChildExtension->DeviceInterface, Stack->Parameters.QueryInterface.Size); + UsbChildExtension->DeviceInterface.InterfaceReference(UsbChildExtension->DeviceInterface.BusContext); Status = STATUS_SUCCESS; break; } // pass irp down IoSkipCurrentIrpStackLocation(Irp); - return IoCallDriver(UsbChildExtension->ParentDeviceObject, Irp); + Status = IoCallDriver(UsbChildExtension->ParentDeviceObject, Irp); + IoReleaseRemoveLock(&UsbChildExtension->Common.RemoveLock, Irp); + return Status; } case IRP_MN_SURPRISE_REMOVAL: { DPRINT("[USBHUB] HandlePnp IRP_MN_SURPRISE_REMOVAL\n"); + + // + // Here we should free all resources and stop all access, lets just set + // the flag and do further clean-up in subsequent IRP_MN_REMOVE_DEVICE + // We can receive this IRP when device is physically connected (on stop/start fail). + // + SET_NEW_PNP_STATE(UsbChildExtension->Common, SurpriseRemovePending); + Status = STATUS_SUCCESS; break; } @@ -757,6 +852,8 @@ Status = Irp->IoStatus.Status; } } + + IoReleaseRemoveLock(&UsbChildExtension->Common.RemoveLock, Irp); Irp->IoStatus.Information = Information; Irp->IoStatus.Status = Status; Modified: trunk/reactos/drivers/usb/usbhub/usbhub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/usbhub.…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/usbhub.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/usbhub.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -62,7 +62,7 @@ PDEVICE_OBJECT DeviceObject; PHUB_DEVICE_EXTENSION HubDeviceExtension; NTSTATUS Status; - DPRINT("USBHUB: AddDevice\n"); + DPRINT("USBHUB: AddDevice (%p)\n", PhysicalDeviceObject); // // Create the Device Object // @@ -86,11 +86,19 @@ HubDeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension; RtlZeroMemory(HubDeviceExtension, sizeof(HUB_DEVICE_EXTENSION)); + INITIALIZE_PNP_STATE(HubDeviceExtension->Common); + // // Set this to Fdo // HubDeviceExtension->Common.IsFDO = TRUE; DeviceObject->Flags |= DO_POWER_PAGABLE; + + // initialize mutex + KeInitializeGuardedMutex(&HubDeviceExtension->HubMutexLock); + + // initialize remove lock + IoInitializeRemoveLock(&HubDeviceExtension->Common.RemoveLock, 'buH', 0, 0); // // initialize reset complete event @@ -159,6 +167,18 @@ } NTSTATUS NTAPI +USBHUB_DispatchSystemControl( + PDEVICE_OBJECT DeviceObject, + PIRP Irp) +{ + DPRINT("Usbhub: DispatchSystemControl\n"); + if (((PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return USBHUB_IrpStub(DeviceObject, Irp); + else + return USBHUB_IrpStub(DeviceObject, Irp); +} + +NTSTATUS NTAPI USBHUB_DispatchInternalDeviceControl( PDEVICE_OBJECT DeviceObject, PIRP Irp) @@ -188,37 +208,59 @@ PIRP Irp) { PIO_STACK_LOCATION IoStack; - + PHUB_DEVICE_EXTENSION DeviceExtension; + NTSTATUS Status; IoStack = IoGetCurrentIrpStackLocation(Irp); + DeviceExtension = DeviceObject->DeviceExtension; + + Status = IoAcquireRemoveLock(&DeviceExtension->Common.RemoveLock, Irp); + if (!NT_SUCCESS(Status)) + { + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } + DPRINT1("Power Function %x\n", IoStack->MinorFunction); - if (IoStack->MinorFunction == IRP_MN_SET_POWER) + if (DeviceExtension->Common.IsFDO) { PoStartNextPowerIrp(Irp); - Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; - - } - else if (IoStack->MinorFunction == IRP_MN_QUERY_POWER) - { - PoStartNextPowerIrp(Irp); - Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; - - } - else if (IoStack->MinorFunction == IRP_MN_WAIT_WAKE) - { - PoStartNextPowerIrp(Irp); - Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; + IoSkipCurrentIrpStackLocation(Irp); + Status = PoCallDriver(DeviceExtension->LowerDeviceObject, Irp); + IoReleaseRemoveLock(&DeviceExtension->Common.RemoveLock, Irp); + return Status; + } + + switch (IoStack->MinorFunction) + { + case IRP_MN_SET_POWER: + { + DPRINT("IRP_MN_SET_POWER\n"); + break; + } + case IRP_MN_QUERY_POWER: + { + DPRINT("IRP_MN_QUERY_POWER\n"); + break; + } + case IRP_MN_WAIT_WAKE: + { + DPRINT("IRP_MN_WAIT_WAKE\n"); + break; + } + default: + { + DPRINT1("PDO IRP_MJ_POWER / unknown minor function 0x%lx\n", IoStack->MinorFunction); + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Irp->IoStatus.Status; + } } PoStartNextPowerIrp(Irp); Irp->IoStatus.Status = STATUS_SUCCESS; IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoReleaseRemoveLock(&DeviceExtension->Common.RemoveLock, Irp); return STATUS_SUCCESS; } @@ -245,6 +287,7 @@ DriverObject->MajorFunction[IRP_MJ_CLOSE] = USBHUB_Close; DriverObject->MajorFunction[IRP_MJ_CLEANUP] = USBHUB_Cleanup; DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = USBHUB_DispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = USBHUB_DispatchSystemControl; DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = USBHUB_DispatchInternalDeviceControl; DriverObject->MajorFunction[IRP_MJ_PNP] = USBHUB_DispatchPnp; DriverObject->MajorFunction[IRP_MJ_POWER] =USBHUB_DispatchPower; Modified: trunk/reactos/drivers/usb/usbhub/usbhub.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/usbhub.…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/usbhub.h [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/usbhub.h [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -39,9 +39,43 @@ PVOID Context; } WORK_ITEM_DATA, *PWORK_ITEM_DATA; + +// +// Definitions for device's PnP state tracking, all this states are described +// in PnP Device States diagram of DDK documentation. +// +typedef enum _DEVICE_PNP_STATE { + + NotStarted = 0, // Not started + Started, // After handling of START_DEVICE IRP + StopPending, // After handling of QUERY_STOP IRP + Stopped, // After handling of STOP_DEVICE IRP + RemovePending, // After handling of QUERY_REMOVE IRP + SurpriseRemovePending, // After handling of SURPRISE_REMOVE IRP + Deleted, // After handling of REMOVE_DEVICE IRP + UnKnown // Unknown state + +} DEVICE_PNP_STATE; + +#define INITIALIZE_PNP_STATE(Data) \ +(Data).PnPState = NotStarted;\ +(Data).PreviousPnPState = NotStarted; + +#define SET_NEW_PNP_STATE(Data, state) \ +(Data).PreviousPnPState = (Data).PnPState;\ +(Data).PnPState = (state); + +#define RESTORE_PREVIOUS_PNP_STATE(Data) \ +(Data).PnPState = (Data).PreviousPnPState; + typedef struct { BOOLEAN IsFDO; + // We'll track device PnP state via this variables + DEVICE_PNP_STATE PnPState; + DEVICE_PNP_STATE PreviousPnPState; + // Remove lock + IO_REMOVE_LOCK RemoveLock; } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION; typedef struct _HUB_CHILDDEVICE_EXTENSION @@ -72,6 +106,8 @@ PDEVICE_OBJECT RootHubPhysicalDeviceObject; PDEVICE_OBJECT RootHubFunctionalDeviceObject; + KGUARDED_MUTEX HubMutexLock; + ULONG NumberOfHubs; KEVENT ResetComplete; @@ -94,7 +130,6 @@ USBD_CONFIGURATION_HANDLE ConfigurationHandle; USBD_PIPE_HANDLE PipeHandle; PVOID RootHubHandle; - USB_BUS_INTERFACE_USBDI_V2 DeviceInterface; UNICODE_STRING SymbolicLinkName; ULONG InstanceCount; Modified: trunk/reactos/sdk/lib/drivers/hidparser/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/hidparser/…
============================================================================== --- trunk/reactos/sdk/lib/drivers/hidparser/context.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/hidparser/context.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -163,7 +163,7 @@ // // store offset // - TargetCollection->Offsets[Collection->NodeCount + Index] = CurrentOffset; + TargetCollection->Offsets[Collection->ReportCount + Index] = CurrentOffset; // // store sub collections @@ -254,7 +254,7 @@ // // get collection // - SubCollection = (PHID_COLLECTION)(CollectionContext->RawData + Collection->Offsets[Collection->NodeCount + Index]); + SubCollection = (PHID_COLLECTION)(CollectionContext->RawData + Collection->Offsets[Collection->ReportCount + Index]); // // recursively search collection @@ -314,7 +314,7 @@ // // get offset to sub collection // - SubCollection = (PHID_COLLECTION)(CollectionContext->RawData + Collection->Offsets[Collection->NodeCount + Index]); + SubCollection = (PHID_COLLECTION)(CollectionContext->RawData + Collection->Offsets[Collection->ReportCount + Index]); // // count collection for sub nodes Modified: trunk/reactos/sdk/lib/drivers/hidparser/hidparser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/hidparser/…
============================================================================== --- trunk/reactos/sdk/lib/drivers/hidparser/hidparser.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/hidparser/hidparser.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -68,7 +68,7 @@ // failed to parse report descriptor // Parser->Debug("[HIDPARSER] Failed to parse report descriptor with %x\n", ParserStatus); - return TranslateHidParserStatus(ParserStatus); + return ParserStatus; } // @@ -126,7 +126,9 @@ // // no memory // - return TranslateHidParserStatus(ParserStatus); + Parser->Free(DeviceDescription->CollectionDesc); + Parser->Free(DeviceDescription->ReportIDs); + return ParserStatus; } // @@ -153,6 +155,13 @@ // get collection usage page // ParserStatus = HidParser_GetCollectionUsagePage((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData, &DeviceDescription->CollectionDesc[Index].Usage, &DeviceDescription->CollectionDesc[Index].UsagePage); + if (ParserStatus != HIDPARSER_STATUS_SUCCESS) + { + // collection not found + Parser->Free(DeviceDescription->CollectionDesc); + Parser->Free(DeviceDescription->ReportIDs); + return ParserStatus; + } // // windows seems to prepend the report id, regardless if it is required Modified: trunk/reactos/sdk/lib/drivers/hidparser/parser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/hidparser/…
============================================================================== --- trunk/reactos/sdk/lib/drivers/hidparser/parser.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/hidparser/parser.c [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -712,30 +712,6 @@ // return HIDPARSER_STATUS_SUCCESS; } - -HIDPARSER_STATUS -AllocateParserContext( - IN PHID_PARSER Parser, - OUT PHID_PARSER_CONTEXT *OutParserContext) -{ - PHID_PARSER_CONTEXT ParserContext; - - ParserContext = Parser->Alloc(sizeof(HID_PARSER_CONTEXT)); - if (!ParserContext) - { - // - // failed - // - return HIDPARSER_STATUS_INSUFFICIENT_RESOURCES; - } - - // - // store result - // - *OutParserContext = ParserContext; - return HIDPARSER_STATUS_SUCCESS; -} - HIDPARSER_STATUS HidParser_ParseReportDescriptor( @@ -760,12 +736,18 @@ PMAIN_ITEM_DATA MainItemData; PHID_PARSER_CONTEXT ParserContext; + CurrentOffset = ReportDescriptor; + ReportEnd = ReportDescriptor + ReportLength; + + if (ReportDescriptor >= ReportEnd) + return HIDPARSER_STATUS_COLLECTION_NOT_FOUND; + // // allocate parser // - Status = AllocateParserContext(Parser, &ParserContext); - if (Status != HIDPARSER_STATUS_SUCCESS) - return Status; + ParserContext = Parser->Alloc(sizeof(HID_PARSER_CONTEXT));; + if (!ParserContext) + return HIDPARSER_STATUS_INSUFFICIENT_RESOURCES; // @@ -778,6 +760,7 @@ // // no memory // + Parser->Free(ParserContext); return HIDPARSER_STATUS_INSUFFICIENT_RESOURCES; } @@ -792,6 +775,7 @@ // Parser->Free(ParserContext->LocalItemState.UsageStack); ParserContext->LocalItemState.UsageStack = NULL; + Parser->Free(ParserContext); return HIDPARSER_STATUS_INSUFFICIENT_RESOURCES; } @@ -799,8 +783,6 @@ // start parsing // CurrentCollection = ParserContext->RootCollection; - CurrentOffset = ReportDescriptor; - ReportEnd = ReportDescriptor + ReportLength; do { @@ -1230,8 +1212,7 @@ // CurrentOffset += CurrentItemSize + sizeof(ITEM_PREFIX); - - }while(CurrentOffset < ReportEnd); + }while (CurrentOffset < ReportEnd); // Modified: trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/libusb/hub…
============================================================================== --- trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp [iso-8859-1] Fri Jan 27 11:09:36 2017 @@ -568,7 +568,8 @@ break; } } - Status = STATUS_SUCCESS; + // Here we should leave Status as is. + Status = Irp->IoStatus.Status; break; } case IRP_MN_QUERY_CAPABILITIES: @@ -611,6 +612,14 @@ // handle device interface requests // Status = HandleQueryInterface(IoStack); + + // + // If a bus driver does not export the requested interface, it + // should leave Status as is. + // + if (Status == STATUS_NOT_SUPPORTED) + Status = Irp->IoStatus.Status; + break; } case IRP_MN_REMOVE_DEVICE: @@ -3736,6 +3745,7 @@ InterfaceHub->SetDeviceHandleData = USBHI_SetDeviceHandleData; } + InterfaceHub->InterfaceReference(InterfaceHub->BusContext); // // request completed // @@ -3790,6 +3800,7 @@ InterfaceDI->EnumLogEntry = USBDI_EnumLogEntry; } + InterfaceDI->InterfaceReference(InterfaceDI->BusContext); // // request completed // Propchange: trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jan 27 11:09:36 2017 @@ -4,6 +4,7 @@ /branches/GSoC_2011/GSoC_TcpIpDriver/drivers/usb/usbehci_new/hub_controller.cpp:51550 /branches/GSoC_2011/TcpIpDriver/drivers/usb/usbehci/hub_controller.cpp:51551-53074,53076-53119 /branches/GSoC_2011/TcpIpDriver/drivers/usb/usbehci_new/hub_controller.cpp:51551-53074,53076-53119 +/branches/GSoC_2016/USB/sdk/lib/drivers/libusb/hub_controller.cpp:72365-73604 /branches/GSoC_Network/drivers/usb/usbehci/hub_controller.cpp:51545-51546 /branches/GSoC_Network/drivers/usb/usbehci_new/hub_controller.cpp:51545-51546 /branches/cmake-bringup/drivers/usb/usbehci/hub_controller.cpp:50484,50693,50719,51544-52564
7 years, 11 months
1
0
0
0
[akhaldi] 73604: [STORAHCI] Merge Storport Miniport driver by Aman Priyadarshi in GSoC.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 10:11:30 2017 New Revision: 73604 URL:
http://svn.reactos.org/svn/reactos?rev=73604&view=rev
Log: [STORAHCI] Merge Storport Miniport driver by Aman Priyadarshi in GSoC. Added: trunk/reactos/drivers/storage/storahci/ - copied from r73603, branches/GSoC_2016/AHCI/drivers/storage/storahci/ Modified: trunk/reactos/ (props changed) trunk/reactos/drivers/storage/CMakeLists.txt Propchange: trunk/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jan 27 10:11:30 2017 @@ -1,6 +1,7 @@ /branches/GSoC_2011/GSoC_Network:51548 /branches/GSoC_2011/GSoC_TcpIpDriver:51550 /branches/GSoC_2011/TcpIpDriver:51551-53074,53076-53119 +/branches/GSoC_2016/AHCI:71203-73603 /branches/GSoC_2016/USB:72366,72376 /branches/GSoC_Network:51545-51546 /branches/cmake-bringup:50484,50693,50719,51544-52564 Modified: trunk/reactos/drivers/storage/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/CMakeLists…
============================================================================== --- trunk/reactos/drivers/storage/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/CMakeLists.txt [iso-8859-1] Fri Jan 27 10:11:30 2017 @@ -6,3 +6,4 @@ add_subdirectory(ide) add_subdirectory(port) add_subdirectory(scsiport) +#add_subdirectory(storahci)
7 years, 11 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200