1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements.  See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership.  The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License") you may not use this file except in compliance
8  * with the License.  You may obtain a copy of the License at
9  *
10  *  http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied.  See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
20 /**
21  * These stubs get linked in when there is no equivalent OS-specific
22  * implementation.
23  */
24 
25 #include "mgmt/mgmt.h"
26 #include "log_mgmt/log_mgmt_impl.h"
27 
28 int __attribute__((weak))
log_mgmt_impl_get_log(int idx,struct log_mgmt_log * out_log)29 log_mgmt_impl_get_log(int idx, struct log_mgmt_log *out_log)
30 {
31     return MGMT_ERR_ENOTSUP;
32 }
33 
34 int __attribute__((weak))
log_mgmt_impl_get_module(int idx,const char ** out_module_name)35 log_mgmt_impl_get_module(int idx, const char **out_module_name)
36 {
37     return MGMT_ERR_ENOTSUP;
38 }
39 
40 int __attribute__((weak))
log_mgmt_impl_get_level(int idx,const char ** out_level_name)41 log_mgmt_impl_get_level(int idx, const char **out_level_name)
42 {
43     return MGMT_ERR_ENOTSUP;
44 }
45 
46 int __attribute__((weak))
log_mgmt_impl_get_next_idx(uint32_t * out_idx)47 log_mgmt_impl_get_next_idx(uint32_t *out_idx)
48 {
49     return MGMT_ERR_ENOTSUP;
50 }
51 
52 int __attribute__((weak))
log_mgmt_impl_foreach_entry(const char * log_name,const struct log_mgmt_filter * filter,log_mgmt_foreach_entry_fn * cb,void * arg)53 log_mgmt_impl_foreach_entry(const char *log_name,
54                             const struct log_mgmt_filter *filter,
55                             log_mgmt_foreach_entry_fn *cb,
56                             void *arg)
57 {
58     return MGMT_ERR_ENOTSUP;
59 }
60 
61 int __attribute__((weak))
log_mgmt_impl_clear(const char * log_name)62 log_mgmt_impl_clear(const char *log_name)
63 {
64     return MGMT_ERR_ENOTSUP;
65 }
66 
67 int __attribute__((weak))
log_mgmt_impl_set_watermark(const struct log_mgmt_log * log,int index)68 log_mgmt_impl_set_watermark(const struct log_mgmt_log *log, int index)
69 {
70     return MGMT_ERR_ENOTSUP;
71 }
72