summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--project/headers.mk1
-rw-r--r--src/internal/ntapi_log.h66
-rw-r--r--src/pty/ntapi_pty_fd.c6
3 files changed, 1 insertions, 72 deletions
diff --git a/project/headers.mk b/project/headers.mk
index a8fe79c..f8bf78a 100644
--- a/project/headers.mk
+++ b/project/headers.mk
@@ -78,7 +78,6 @@ INTERNAL_HEADERS = \
$(SOURCE_DIR)/src/internal/./ntapi_fnapi.h \
$(SOURCE_DIR)/src/internal/./ntapi_hash_table.h \
$(SOURCE_DIR)/src/internal/./ntapi_impl.h \
- $(SOURCE_DIR)/src/internal/./ntapi_log.h \
$(SOURCE_DIR)/src/internal/./ntapi_pty.h \
ALL_HEADERS = $(API_HEADERS) $(INTERNAL_HEADERS) \
diff --git a/src/internal/ntapi_log.h b/src/internal/ntapi_log.h
deleted file mode 100644
index 59aa603..0000000
--- a/src/internal/ntapi_log.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************/
-/* ntapi: Native API core library */
-/* Copyright (C) 2013--2017 Z. Gilboa */
-/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */
-/********************************************************/
-
-#include <psxtypes/psxtypes.h>
-#include <ntapi/nt_file.h>
-#include <ntapi/ntapi.h>
-#include "ntapi_impl.h"
-
-static inline int __ntapi_uintptr_to_utf8(uintptr_t value,unsigned char * buf)
-{
- int i,len;
- uintptr_t val;
-
- if (!value) {
- *buf = '0';
- len = 1;
- } else {
- for (len=0,val=value; val; val=val/10,len++);
- for (i=len,buf+=len-1; i; i--,buf--,value=value/10)
- *buf = '0' + (value % 10);
- }
-
- return len;
-}
-
-static inline ssize_t __ntapi_log_write(void * msg,uint32_t size)
-{
- int32_t status;
- void * hlog;
- nt_iosb iosb;
- uintptr_t buffer[8] = {0};
- unsigned char * ch = (unsigned char *)buffer;
-
- if (!(hlog = __ntapi_internals()->rtdata->hlog))
- return NT_STATUS_INVALID_HANDLE;
-
- *ch++ = '@';
- ch += __ntapi_uintptr_to_utf8(
- pe_get_current_process_id(),
- ch);
- *ch++ = ':';
- ch += __ntapi_uintptr_to_utf8(
- pe_get_current_thread_id(),
- ch);
- *ch++ = '@';
- *ch++ = ' ';
-
- __ntapi->zw_write_file(
- hlog,
- 0,0,0,&iosb,
- buffer,
- (uint32_t)(ch-(unsigned char *)buffer),
- 0,0);
-
- status = __ntapi->zw_write_file(
- hlog,
- 0,0,0,&iosb,
- msg,
- (uint32_t)size,
- 0,0);
-
- return status ? -1 : iosb.info;
-}
diff --git a/src/pty/ntapi_pty_fd.c b/src/pty/ntapi_pty_fd.c
index cc016ce..8d21fd0 100644
--- a/src/pty/ntapi_pty_fd.c
+++ b/src/pty/ntapi_pty_fd.c
@@ -9,7 +9,6 @@
#include <ntapi/nt_tty.h>
#include <ntapi/ntapi.h>
#include "ntapi_impl.h"
-#include "ntapi_log.h"
#include "ntapi_pty.h"
static int32_t __stdcall __ntapi_pty_open_close(
@@ -145,8 +144,7 @@ static int32_t __ntapi_pty_connect(
ctx->section_addr = 0;
/* resilience */
- if (!ctx->section_addr) {
- __ntapi_log_write("__ntapi_pty_connect:149\n",24);
+ if (!ctx->section_addr)
if ((status = __ntapi->zw_map_view_of_section(
ctx->section,
NT_CURRENT_PROCESS_HANDLE,
@@ -156,8 +154,6 @@ static int32_t __ntapi_pty_connect(
NT_VIEW_UNMAP,0,
NT_PAGE_READWRITE)))
return __ntapi_pty_fail(ctx,status);
- __ntapi_log_write("__ntapi_pty_connect:159\n",24);
- }
/* assume conforming clients, config for single lock try */
__ntapi->tt_sync_block_init(&ctx->sync[__PTY_READ],0,0,1,0,0);