812 if (is_newly_obsolete(arg, &since)) { 813 char version[256]; 814 since.to_string(version, sizeof(version)); 815 warning("ignoring option %s; support was removed in %s", argname, version); 816 return true; 817 } 818 819 // For locked flags, report a custom error message if available. 820 // Otherwise, report the standard unrecognized VM option. 821 822 Flag* locked_flag = Flag::find_flag((char*)argname, strlen(argname), true); 823 if (locked_flag != NULL) { 824 char locked_message_buf[BUFLEN]; 825 locked_flag->get_locked_message(locked_message_buf, BUFLEN); 826 if (strlen(locked_message_buf) == 0) { 827 jio_fprintf(defaultStream::error_stream(), 828 "Unrecognized VM option '%s'\n", argname); 829 } else { 830 jio_fprintf(defaultStream::error_stream(), "%s", locked_message_buf); 831 } 832 } 833 834 // allow for commandline "commenting out" options like -XX:#+Verbose 835 return arg[0] == '#'; 836 } 837 838 bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) { 839 FILE* stream = fopen(file_name, "rb"); 840 if (stream == NULL) { 841 if (should_exist) { 842 jio_fprintf(defaultStream::error_stream(), 843 "Could not open settings file %s\n", file_name); 844 return false; 845 } else { 846 return true; 847 } 848 } 849 850 char token[1024]; 851 int pos = 0; | 812 if (is_newly_obsolete(arg, &since)) { 813 char version[256]; 814 since.to_string(version, sizeof(version)); 815 warning("ignoring option %s; support was removed in %s", argname, version); 816 return true; 817 } 818 819 // For locked flags, report a custom error message if available. 820 // Otherwise, report the standard unrecognized VM option. 821 822 Flag* locked_flag = Flag::find_flag((char*)argname, strlen(argname), true); 823 if (locked_flag != NULL) { 824 char locked_message_buf[BUFLEN]; 825 locked_flag->get_locked_message(locked_message_buf, BUFLEN); 826 if (strlen(locked_message_buf) == 0) { 827 jio_fprintf(defaultStream::error_stream(), 828 "Unrecognized VM option '%s'\n", argname); 829 } else { 830 jio_fprintf(defaultStream::error_stream(), "%s", locked_message_buf); 831 } 832 } else { 833 jio_fprintf(defaultStream::error_stream(), 834 "Unrecognized VM option '%s'\n", argname); 835 } 836 837 // allow for commandline "commenting out" options like -XX:#+Verbose 838 return arg[0] == '#'; 839 } 840 841 bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) { 842 FILE* stream = fopen(file_name, "rb"); 843 if (stream == NULL) { 844 if (should_exist) { 845 jio_fprintf(defaultStream::error_stream(), 846 "Could not open settings file %s\n", file_name); 847 return false; 848 } else { 849 return true; 850 } 851 } 852 853 char token[1024]; 854 int pos = 0; |