Beispiel #1
0
/* 
 * printf: 
 *   Invokes OCALL to display the enclave buffer to the terminal.
 */
void printf(const char *fmt, ...)
{
    char buf[BUFSIZ] = {'\0'};
    va_list ap;
    va_start(ap, fmt);
    vsnprintf(buf, BUFSIZ, fmt, ap);
    va_end(ap);
    ocall_print_string(buf);
}
Beispiel #2
0
int vfprintf(FILE __rte_unused *f /* unused */, const char *fmt, va_list ap)
{
    char buf[BUFSIZ] = {'\0'};
    // va_start(ap, fmt);
    vsnprintf(buf, BUFSIZ, fmt, ap);
    // va_end(ap);
    ocall_print_string(buf);
    return 0;
}
Beispiel #3
0
int printf_sgx(const char *fmt, ...)
{
    int ret;
    va_list ap;
    char buf[BUFSIZ] = {'\0'};
    va_start(ap, fmt);
    vsnprintf(buf, BUFSIZ, fmt, ap);
    va_end(ap);

    ocall_print_string(&ret, buf);
    return ret;
}
Beispiel #4
0
void _DkPrintConsole (const void * buf, int size)
{
    ocall_print_string(buf, size);
}