src/hotspot/os/linux/os_linux.cpp
changeset 50667 cc58f1fa0438
parent 50526 3a5aafb12ae6
child 50930 6a5f1195e15f
child 51020 1835f9fca157
equal deleted inserted replaced
50666:3e66d204af9b 50667:cc58f1fa0438
  5376   while (::read(0, buf, sizeof(buf)) <= 0) { ::sleep(100); }
  5376   while (::read(0, buf, sizeof(buf)) <= 0) { ::sleep(100); }
  5377 
  5377 
  5378   return buf[0] == 'y' || buf[0] == 'Y';
  5378   return buf[0] == 'y' || buf[0] == 'Y';
  5379 }
  5379 }
  5380 
  5380 
  5381 int os::stat(const char *path, struct stat *sbuf) {
       
  5382   char pathbuf[MAX_PATH];
       
  5383   if (strlen(path) > MAX_PATH - 1) {
       
  5384     errno = ENAMETOOLONG;
       
  5385     return -1;
       
  5386   }
       
  5387   os::native_path(strcpy(pathbuf, path));
       
  5388   return ::stat(pathbuf, sbuf);
       
  5389 }
       
  5390 
       
  5391 // Is a (classpath) directory empty?
  5381 // Is a (classpath) directory empty?
  5392 bool os::dir_is_empty(const char* path) {
  5382 bool os::dir_is_empty(const char* path) {
  5393   DIR *dir = NULL;
  5383   DIR *dir = NULL;
  5394   struct dirent *ptr;
  5384   struct dirent *ptr;
  5395 
  5385