From bf3927a7585925920d0145464985df0cbc35ccde Mon Sep 17 00:00:00 2001 From: midipix Date: Jun 27 2020 10:05:28 +0000 Subject: library api: struct toks_service_info: refactor (`free' may be a macro name). --- diff --git a/include/toksvc/toksvc.h b/include/toksvc/toksvc.h index 021acd6..b5b45aa 100644 --- a/include/toksvc/toksvc.h +++ b/include/toksvc/toksvc.h @@ -149,8 +149,8 @@ struct toks_service_info { int32_t csyspid; int32_t allocated; int32_t available; - int32_t used; - int32_t free; + int32_t tused; + int32_t tfree; int32_t loglevel; }; diff --git a/src/client/toks_client_query.c b/src/client/toks_client_query.c index f3bb77b..5257226 100644 --- a/src/client/toks_client_query.c +++ b/src/client/toks_client_query.c @@ -65,8 +65,8 @@ int32_t toks_client_query_service( svcinfo->available = msg.svcdata.data[5]; /* used, free */ - svcinfo->used = msg.svcdata.data[6]; - svcinfo->free = msg.svcdata.data[7]; + svcinfo->tused = msg.svcdata.data[6]; + svcinfo->tfree = msg.svcdata.data[7]; return NT_STATUS_SUCCESS; } diff --git a/src/driver/toks_amain.c b/src/driver/toks_amain.c index f24fb92..f6580c3 100644 --- a/src/driver/toks_amain.c +++ b/src/driver/toks_amain.c @@ -15,8 +15,6 @@ #include "toksvc_nolibc_impl.h" #include "toksvc_log_impl.h" -#undef free - #ifndef TOKS_DRIVER_FLAGS #define TOKS_DRIVER_FLAGS TOKS_DRIVER_VERBOSITY_ERRORS \ | TOKS_DRIVER_DAEMON_ALWAYS \ @@ -71,8 +69,8 @@ static ssize_t toks_output_service_info(struct toks_service_info * svcinfo) "toks_csyspid:%d\n" "toks_allocated:%d\n" "toks_available:%d\n" - "toks_used:%d\n" - "toks_free:%d\n" + "toks_tused:%d\n" + "toks_tfree:%d\n" "toks_loglevel:%d\n", guidstr, svcinfo->syspid, @@ -81,8 +79,8 @@ static ssize_t toks_output_service_info(struct toks_service_info * svcinfo) svcinfo->csyspid, svcinfo->allocated, svcinfo->available, - svcinfo->used, - svcinfo->free, + svcinfo->tused, + svcinfo->tfree, svcinfo->loglevel); }