mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8218063: JDK-8218060 breaks build for S390
Reinstated function removed by JDK-8218060 and properly ifdef'ed it. Reviewed-by: shade, eosterlund
This commit is contained in:
parent
8c9cc0b205
commit
3f0ac3a75c
1 changed files with 30 additions and 0 deletions
|
@ -1856,6 +1856,36 @@ static bool _print_ascii_file(const char* filename, outputStream* st, const char
|
|||
return true;
|
||||
}
|
||||
|
||||
#if defined(S390)
|
||||
// keywords_to_match - NULL terminated array of keywords
|
||||
static bool print_matching_lines_from_sysinfo_file(outputStream* st, const char* keywords_to_match[]) {
|
||||
const char* filename = "/proc/sysinfo";
|
||||
char* line = NULL;
|
||||
size_t length = 0;
|
||||
FILE* fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
st->print_cr("Virtualization information:");
|
||||
while (getline(&line, &length, fp) != -1) {
|
||||
int i = 0;
|
||||
while (keywords_to_match[i] != NULL) {
|
||||
if (strncmp(line, keywords_to_match[i], strlen(keywords_to_match[i])) == 0) {
|
||||
st->print("%s", line);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
free(line);
|
||||
fclose(fp);
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void os::print_dll_info(outputStream *st) {
|
||||
st->print_cr("Dynamic libraries:");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue