<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><br>
      <br>
      Harold,<br>
      <br>
      Thanks for making the changes. One further question (sorry for not
      asking this the first time around):<br>
      <br>
      Is there a fundamental reason for finding the last equals ('=')
      instead of the first one - i.e. would it make more sense to use
      strchr instead of strrchr? Not that I think we have any options
      that accept multiple equals today, but...<br>
      <br>
      Cheers,<br>
      Mikael<br>
      <br>
      On 2013-01-31 06:55, harold seigel wrote:<br>
    </div>
    <blockquote cite="mid:510A85EF.7030505@oracle.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hi,<br>
      <br>
      Thank you for your comments!<br>
      <br>
      Please review this updated webrev:&nbsp; <a moz-do-not-send="true"
        href="http://cr.openjdk.java.net/%7Ehseigel/bug_8006298_2/">http://cr.openjdk.java.net/~hseigel/bug_8006298_2/</a><br>
      <br>
      It avoids the 'const' and '\0' issues by determining the length of
      the argument and passing it to find_flag().<br>
      <br>
      This changes the output messages slightly, by including the '=...'
      text.&nbsp; For example:<br>
      <blockquote>&nbsp;% $JAVA_HOME/bin/java -XX:+UseLargePages=8 -version<br>
        Improperly specified VM option 'UseLargePages=8'<br>
        <br>
        % $JAVA_HOME/bin/java -XX:-ObjectAlignmentInBytes=16 -version<br>
        Unexpected +/- setting in VM option 'ObjectAlignmentInBytes=16'<br>
      </blockquote>
      Thanks, Harold<br>
      <br>
      <br>
      On 1/30/2013 10:39 PM, Vitaly Davidovich wrote:
      <blockquote
cite="mid:CAHjP37GdQdZgZTnH69e4Bj=m96xicT0CsQo4xVddpu6AnERtgA@mail.gmail.com"
        type="cite">
        <p dir="ltr">I'd also change "equal_sign[0] = 0;" to
          "equal_sign[0] = '\0';" if this line is to be kept - it's more
          idiomatic.</p>
        <p dir="ltr">Thanks</p>
        <p dir="ltr">Sent from my phone</p>
        <div class="gmail_quote">On Jan 30, 2013 8:34 PM, "Mikael
          Vidstedt" &lt;<a moz-do-not-send="true"
            href="mailto:mikael.vidstedt@oracle.com">mikael.vidstedt@oracle.com</a>&gt;

          wrote:<br type="attribution">
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div><br>
                Harold,<br>
                <br>
                Thanks for doing this, I like the improved messages a
                lot!<br>
                <br>
                One small question:<br>
                <br>
                The first argument to process_argument is a "const char*
                arg". argname is also const, based on arg. You do this:<br>
                <br>
                <tt>char* equal_sign = (char *)strrchr(argname, '=');</tt><tt><br>
                </tt><tt><span>if (equal_sign &gt; argname)</span></tt><br>
                <tt>&nbsp; </tt><tt><span>equal_sign[0] = 0;</span></tt><br>
                <br>
                Doesn't that effectively break the const'ness of the
                incoming argument?<br>
                <br>
                Cheers,<br>
                Mikael<br>
                <br>
                On 2013-01-30 10:51, harold seigel wrote:<br>
              </div>
              <blockquote type="cite"> Hi,<br>
                <br>
                Please review the following change to fix bug 8006298.<br>
                <br>
                Summary:<br>
                This change enables hotspot to emit more useful messages
                when Java options are specified incorrectly.<br>
                <br>
                This was tested using JCK, UTE, and JTREG tests, and by
                hand.&nbsp; Below are the test cases that were run by hand.&nbsp;
                Please let me know if you have any additional
                suggestions.&nbsp; (The "Error:..." messages appeared in all
                cases but are only shown for the initial case.)<br>
                <blockquote>$JAVA_HOME/bin/java -XX:UseLargePages
                  -version<br>
                  Missing +/- setting for VM option 'UseLargePages'<br>
                  Error: Could not create the Java Virtual Machine.<br>
                  Error: A fatal exception has occurred. Program will
                  exit.<br>
                  <br>
                  $JAVA_HOME/bin/java -XX:+UseLargePages=8 -version<br>
                  Improperly specified VM option 'UseLargePages'<br>
                  <br>
                  $JAVA_HOME/bin/java -XX:ObjectAlignmentInBytes=v
                  -version<br>
                  Improperly specified VM option
                  'ObjectAlignmentInBytes'<br>
                  <br>
                  $JAVA_HOME/bin/java -XX:-ObjectAlignmentInBytes=16
                  -version<br>
                  Unexpected +/- setting in VM option
                  'ObjectAlignmentInBytes'&nbsp;&nbsp; &lt;-- 64 bit VM's<br>
                  Unrecognized VM option
                  'ObjectAlignmentInBytes'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;-- 32 bit
                  VM's<br>
                  <br>
                  $JAVA_HOME/bin/java -XX:bogus_option -version<br>
                  Unrecognized VM option 'bogus_option'<br>
                </blockquote>
                Open webrev at <a moz-do-not-send="true"
                  href="http://cr.openjdk.java.net/%7Ehseigel/bug_8006298/"
                  target="_blank">http://cr.openjdk.java.net/~hseigel/bug_8006298/</a><br>
                <br>
                Bug link at <a moz-do-not-send="true"
                  href="http://bugs.sun.com/view_bug.do?bug_id=8006298"
                  target="_blank">http://bugs.sun.com/view_bug.do?bug_id=8006298</a><br>
                <br>
                Thanks!&nbsp; Harold <br>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>