1.1 --- a/src/share/vm/runtime/os.cpp Fri Sep 06 09:55:38 2013 +0100 1.2 +++ b/src/share/vm/runtime/os.cpp Sat Sep 14 20:40:34 2013 +0100 1.3 @@ -1482,44 +1482,6 @@ 1.4 return result; 1.5 } 1.6 1.7 -// Read file line by line, if line is longer than bsize, 1.8 -// skip rest of line. 1.9 -int os::get_line_chars(int fd, char* buf, const size_t bsize){ 1.10 - size_t sz, i = 0; 1.11 - 1.12 - // read until EOF, EOL or buf is full 1.13 - while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-2) && buf[i] != '\n') { 1.14 - ++i; 1.15 - } 1.16 - 1.17 - if (buf[i] == '\n') { 1.18 - // EOL reached so ignore EOL character and return 1.19 - 1.20 - buf[i] = 0; 1.21 - return (int) i; 1.22 - } 1.23 - 1.24 - buf[i+1] = 0; 1.25 - 1.26 - if (sz != 1) { 1.27 - // EOF reached. if we read chars before EOF return them and 1.28 - // return EOF on next call otherwise return EOF 1.29 - 1.30 - return (i == 0) ? -1 : (int) i; 1.31 - } 1.32 - 1.33 - // line is longer than size of buf, skip to EOL 1.34 - char ch; 1.35 - while (read(fd, &ch, 1) == 1 && ch != '\n') { 1.36 - // Do nothing 1.37 - } 1.38 - 1.39 - // return initial part of line that fits in buf. 1.40 - // If we reached EOF, it will be returned on next call. 1.41 - 1.42 - return (int) i; 1.43 -} 1.44 - 1.45 void os::SuspendedThreadTask::run() { 1.46 assert(Threads_lock->owned_by_self() || (_thread == VMThread::vm_thread()), "must have threads lock to call this"); 1.47 internal_do_task();