5784 if (p == NULL) return false; 5785 else *p = '\0'; 5786 5787 // Get rid of client or server 5788 p = strrchr(buf, '/'); 5789 if (p == NULL) return false; 5790 else *p = '\0'; 5791 5792 // check xawt/libmawt.so 5793 strcpy(libmawtpath, buf); 5794 strcat(libmawtpath, xawtstr); 5795 if (::stat(libmawtpath, &statbuf) == 0) return false; 5796 5797 // check libawt_xawt.so 5798 strcpy(libmawtpath, buf); 5799 strcat(libmawtpath, new_xawtstr); 5800 if (::stat(libmawtpath, &statbuf) == 0) return false; 5801 5802 return true; 5803 } | 5784 if (p == NULL) return false; 5785 else *p = '\0'; 5786 5787 // Get rid of client or server 5788 p = strrchr(buf, '/'); 5789 if (p == NULL) return false; 5790 else *p = '\0'; 5791 5792 // check xawt/libmawt.so 5793 strcpy(libmawtpath, buf); 5794 strcat(libmawtpath, xawtstr); 5795 if (::stat(libmawtpath, &statbuf) == 0) return false; 5796 5797 // check libawt_xawt.so 5798 strcpy(libmawtpath, buf); 5799 strcat(libmawtpath, new_xawtstr); 5800 if (::stat(libmawtpath, &statbuf) == 0) return false; 5801 5802 return true; 5803 } 5804 5805 // Get the default path to the core file 5806 // Returns the length of the string 5807 int os::get_core_path(char* buffer, size_t bufferSize) { 5808 int n = jio_snprintf(buffer, bufferSize, "/cores"); 5809 5810 // Truncate if theoretical string was longer than bufferSize 5811 n = MIN2(n, (int)bufferSize); 5812 5813 return n; 5814 } |