Lines Matching refs:buf
235 bool os::getenv(const char* name, char* buf, int len) {
238 strcpy(buf, val);
241 if (len > 0) buf[0] = 0; // return a null string
475 char buf[MAXPATHLEN];
476 os::jvm_path(buf, sizeof(buf));
480 *(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */
481 pslash = strrchr(buf, '/');
484 dll_path = malloc(strlen(buf) + 1);
487 strcpy(dll_path, buf);
491 pslash = strrchr(buf, '/');
495 pslash = strrchr(buf, '/');
502 home_path = malloc(strlen(buf) + 1);
505 strcpy(home_path, buf);
600 char *buf = malloc(strlen(Arguments::get_java_home()) +
602 sprintf(buf, "%s" SYS_EXTENSIONS_DIR ":%s" EXTENSIONS_DIR ":"
605 char *buf = malloc(strlen(Arguments::get_java_home()) +
607 sprintf(buf, "%s" EXTENSIONS_DIR ":" REG_DIR EXTENSIONS_DIR,
611 Arguments::set_ext_dirs(buf);
616 char * buf;
617 buf = malloc(strlen(Arguments::get_java_home()) + sizeof(ENDORSED_DIR));
618 sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home());
619 Arguments::set_endorsed_dirs(buf);
1744 char * os::local_time_string(char *buf, size_t buflen) {
1749 jio_snprintf(buf, buflen, "%d-%02d-%02d %02d:%02d:%02d",
1752 return buf;
1793 char buf[16];
1794 jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1795 out.print_raw_cr(buf);
1817 size_t os::lasterror(char *buf, size_t len) {
1826 ::strncpy(buf, s, n);
1827 buf[n] = '\0';
1939 const char* os::get_current_directory(char *buf, int buflen) {
1940 return getcwd(buf, buflen);
1964 bool os::dll_address_to_function_name(address addr, char *buf,
1972 if (buf != NULL) {
1973 if(!Decoder::demangle(dlinfo.dli_sname, buf, buflen)) {
1974 jio_snprintf(buf, buflen, "%s", dlinfo.dli_sname);
1981 buf, buflen, offset, dlinfo.dli_fname)) {
1989 if(!Decoder::demangle(localbuf, buf, buflen)) {
1990 jio_snprintf(buf, buflen, "%s", localbuf);
1994 if (buf != NULL) buf[0] = '\0';
2001 bool os::dll_address_to_library_name(address addr, char* buf,
2006 if (buf) jio_snprintf(buf, buflen, "%s", dlinfo.dli_fname);
2010 if (buf) buf[0] = '\0';
2060 bool os::dll_address_to_library_name(address addr, char* buf,
2071 data.fname = buf;
2077 // buf already contains library name
2081 if (buf) jio_snprintf(buf, buflen, "%s", dlinfo.dli_fname);
2085 if (buf) buf[0] = '\0';
2300 char buf[32];
2302 while ((bytes = ::read(fd, buf, sizeof(buf))) > 0) {
2303 st->print_raw(buf, bytes);
2438 char buf[buflen];
2440 st->print("si_signo=%s: ", os::exception_name(si->si_signo, buf, buflen));
2441 if (si->si_errno != 0 && strerror_r(si->si_errno, buf, buflen) == 0) {
2442 st->print("si_errno=%s", buf);
2484 char* buf, size_t buflen);
2486 void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
2488 print_signal_handler(st, SIGSEGV, buf, buflen);
2489 print_signal_handler(st, SIGBUS , buf, buflen);
2490 print_signal_handler(st, SIGFPE , buf, buflen);
2491 print_signal_handler(st, SIGPIPE, buf, buflen);
2492 print_signal_handler(st, SIGXFSZ, buf, buflen);
2493 print_signal_handler(st, SIGILL , buf, buflen);
2494 print_signal_handler(st, INTERRUPT_SIGNAL, buf, buflen);
2495 print_signal_handler(st, SR_signum, buf, buflen);
2496 print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen);
2497 print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen);
2498 print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen);
2499 print_signal_handler(st, BREAK_SIGNAL, buf, buflen);
2505 void os::jvm_path(char *buf, jint buflen) {
2509 buf[0] = '\0';
2514 strcpy(buf, saved_jvm_path);
2523 char *rp = realpath(dli_fname, buf);
2528 // Support for the gamma launcher. Typical value for buf is
2534 const char *p = buf + strlen(buf) - 1;
2535 for (int count = 0; p > buf && count < 5; ++count) {
2536 for (--p; p > buf && *p != '/'; --p)
2548 p = strrchr(buf, '/');
2552 rp = realpath(java_home_var, buf);
2558 len = strlen(buf);
2559 jrelib_p = buf + len;
2563 if (0 != access(buf, F_OK)) {
2568 len = strlen(buf);
2569 jrelib_p = buf + len;
2571 if (0 != access(buf, F_OK)) {
2578 if (0 == access(buf, F_OK)) {
2582 len = strlen(buf);
2583 snprintf(buf + len, buflen-len, "/libjvm%s%s", p, JNI_LIB_SUFFIX);
2586 rp = realpath(dli_fname, buf);
2594 strcpy(saved_jvm_path, buf);
2869 char buf[PATH_MAX + 1];
2872 snprintf(buf, PATH_MAX + 1, "%s/hs-vm-%d-%d",
2874 unlink(buf);
2876 int fd = ::open(buf, O_CREAT | O_RDWR, S_IRWXU);
2888 unlink(buf);
3363 char buf[16];
3365 if (x && fgets(buf, sizeof(buf), fp) && strcmp(buf, " kB\n") == 0) {
3591 size_t os::read(int fd, void *buf, unsigned int nBytes) {
3592 RESTARTABLE_RETURN_INT(::read(fd, buf, nBytes));
4436 char* buf, int buflen) {
4438 bool found = os::dll_address_to_library_name(handler, buf, buflen, &offset);
4442 p1 = buf;
4445 jio_snprintf(buf, buflen, "%s+0x%x", p1, offset);
4447 jio_snprintf(buf, buflen, PTR_FORMAT, handler);
4449 return buf;
4453 char* buf, size_t buflen) {
4461 st->print("%s: ", os::exception_name(sig, buf, buflen));
4472 st->print("[%s]", get_signal_handler_name(handler, buf, buflen));
4542 char buf[O_BUFLEN];
4594 tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN));
4595 tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN));
4596 tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN));
4600 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
4609 print_signal_handlers(tty, buf, O_BUFLEN);
4615 extern bool signal_name(int signo, char* buf, size_t len);
4617 const char* os::exception_name(int exception_code, char* buf, size_t size) {
4620 if (!signal_name(exception_code, buf, size)) {
4621 jio_snprintf(buf, size, "SIG%d", exception_code);
4623 return buf;
4885 char buf[MAXTHREADNAMESIZE];
4886 snprintf(buf, sizeof(buf), "Java: %s", name);
4887 pthread_setname_np(buf);
5051 char buf[16];
5053 while (::read(0, buf, sizeof(buf)) <= 0) { ::sleep(100); }
5055 return buf[0] == 'y' || buf[0] == 'Y';
5072 int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
5073 return ::vsnprintf(buf, count, format, args);
5086 char buf[sizeof(struct dirent) + MAX_PATH];
5122 struct stat buf;
5123 int ret = ::fstat(fd, &buf);
5124 int st_mode = buf.st_mode;
5200 struct stat buf;
5202 if (::fstat(fd, &buf) >= 0) {
5203 mode = buf.st_mode;
5508 struct stat buf;
5510 while (::stat(filename, &buf) == 0) {
6036 char buf[MAXPATHLEN];
6043 os::jvm_path(buf, sizeof(buf));
6046 p = strrchr(buf, '/');
6051 p = strrchr(buf, '/');
6056 strcpy(libmawtpath, buf);
6061 strcpy(libmawtpath, buf);