@@ -79,6 +79,11 @@ char *Strdup(const char *s) {
7979 return p ;
8080}
8181
82+ int umfCtlGet (const char * name , void * ctx , void * arg ) {
83+ return ctl_query (NULL , ctx , CTL_QUERY_PROGRAMMATIC , name , CTL_QUERY_READ ,
84+ arg );
85+ }
86+
8287/*
8388 * ctl_find_node -- (internal) searches for a matching entry point in the
8489 * provided nodes
@@ -251,7 +256,7 @@ static int ctl_exec_query_read(void *ctx, const struct ctl_node *n,
251256 enum ctl_query_source source , void * arg ,
252257 struct ctl_index_utlist * indexes ,
253258 char * extra_name ,
254- enum ctl_query_type query_type ) {
259+ umf_ctl_query_type query_type ) {
255260 (void )extra_name , (void )query_type ;
256261 if (arg == NULL ) {
257262 errno = EINVAL ;
@@ -270,7 +275,7 @@ static int ctl_exec_query_write(void *ctx, const struct ctl_node *n,
270275 enum ctl_query_source source , void * arg ,
271276 struct ctl_index_utlist * indexes ,
272277 char * extra_name ,
273- enum ctl_query_type query_type ) {
278+ umf_ctl_query_type query_type ) {
274279 (void )extra_name , (void )query_type ;
275280 if (arg == NULL ) {
276281 errno = EINVAL ;
@@ -297,7 +302,7 @@ static int ctl_exec_query_runnable(void *ctx, const struct ctl_node *n,
297302 enum ctl_query_source source , void * arg ,
298303 struct ctl_index_utlist * indexes ,
299304 char * extra_name ,
300- enum ctl_query_type query_type ) {
305+ umf_ctl_query_type query_type ) {
301306 (void )extra_name , (void )query_type ;
302307 assert (MAX_CTL_QUERY_TYPE != query_type );
303308 return n -> cb [CTL_QUERY_RUNNABLE ](ctx , source , arg , indexes , NULL ,
@@ -308,15 +313,15 @@ static int ctl_exec_query_subtree(void *ctx, const struct ctl_node *n,
308313 enum ctl_query_source source , void * arg ,
309314 struct ctl_index_utlist * indexes ,
310315 char * extra_name ,
311- enum ctl_query_type query_type ) {
316+ umf_ctl_query_type query_type ) {
312317 return n -> cb [CTL_QUERY_SUBTREE ](ctx , source , arg , indexes , extra_name ,
313318 query_type );
314319}
315320
316321static int (* ctl_exec_query [MAX_CTL_QUERY_TYPE ])(
317322 void * ctx , const struct ctl_node * n , enum ctl_query_source source ,
318323 void * arg , struct ctl_index_utlist * indexes , char * extra_name ,
319- enum ctl_query_type query_type ) = {
324+ umf_ctl_query_type query_type ) = {
320325 ctl_exec_query_read ,
321326 ctl_exec_query_write ,
322327 ctl_exec_query_runnable ,
@@ -328,7 +333,7 @@ static int (*ctl_exec_query[MAX_CTL_QUERY_TYPE])(
328333 * from the ctl tree
329334 */
330335int ctl_query (struct ctl * ctl , void * ctx , enum ctl_query_source source ,
331- const char * name , enum ctl_query_type type , void * arg ) {
336+ const char * name , umf_ctl_query_type type , void * arg ) {
332337 if (name == NULL ) {
333338 errno = EINVAL ;
334339 return -1 ;
@@ -629,9 +634,3 @@ int ctl_arg_string(const void *arg, void *dest, size_t dest_size) {
629634
630635 return 0 ;
631636}
632-
633- void umfCtlGet (const char * name , ...) { (void )name ; }
634-
635- void umfCtlSet (const char * name , ...) { (void )name ; }
636-
637- void umfCtlExec (const char * name , ...) { (void )name ; }
0 commit comments