< prev index next >
src/hotspot/os/linux/gc/z/zMountPoint_linux.cpp
Print this page
*** 81,91 ****
size_t length = 0;
while (getline(&line, &length, fd) != -1) {
char* const mountpoint = get_mountpoint(line, filesystem);
if (mountpoint != NULL) {
! mountpoints->add(mountpoint);
}
}
free(line);
fclose(fd);
--- 81,91 ----
size_t length = 0;
while (getline(&line, &length, fd) != -1) {
char* const mountpoint = get_mountpoint(line, filesystem);
if (mountpoint != NULL) {
! mountpoints->append(mountpoint);
}
}
free(line);
fclose(fd);
*** 127,140 ****
char* path = NULL;
ZArray<char*> mountpoints;
get_mountpoints(filesystem, &mountpoints);
! if (mountpoints.size() == 0) {
// No mount point found
log_error_p(gc)("Failed to find an accessible %s filesystem", filesystem);
! } else if (mountpoints.size() == 1) {
// One mount point found
path = strdup(mountpoints.at(0));
} else {
// More than one mount point found
path = find_preferred_mountpoint(filesystem, &mountpoints, preferred_mountpoints);
--- 127,140 ----
char* path = NULL;
ZArray<char*> mountpoints;
get_mountpoints(filesystem, &mountpoints);
! if (mountpoints.length() == 0) {
// No mount point found
log_error_p(gc)("Failed to find an accessible %s filesystem", filesystem);
! } else if (mountpoints.length() == 1) {
// One mount point found
path = strdup(mountpoints.at(0));
} else {
// More than one mount point found
path = find_preferred_mountpoint(filesystem, &mountpoints, preferred_mountpoints);
< prev index next >