andrzej-kaczmarek closed pull request #1340: sys/log: Fix build without
LOG_STORAGE_WATERMARK
URL: https://github.com/apache/mynewt-core/pull/1340
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/sys/log/full/src/log_nmgr.c b/sys/log/full/src/log_nmgr.c
index 53ba441be2..6882b07ba8 100644
--- a/sys/log/full/src/log_nmgr.c
+++ b/sys/log/full/src/log_nmgr.c
@@ -38,7 +38,9 @@ static int log_nmgr_clear(struct mgmt_cbuf *njb);
static int log_nmgr_module_list(struct mgmt_cbuf *njb);
static int log_nmgr_level_list(struct mgmt_cbuf *njb);
static int log_nmgr_logs_list(struct mgmt_cbuf *njb);
+#if MYNEWT_VAL(LOG_STORAGE_WATERMARK)
static int log_nmgr_set_watermark(struct mgmt_cbuf *njb);
+#endif
static struct mgmt_group log_nmgr_group;
@@ -51,7 +53,9 @@ static struct mgmt_handler log_nmgr_group_handlers[] = {
[LOGS_NMGR_OP_MODULE_LIST] = {log_nmgr_module_list, NULL},
[LOGS_NMGR_OP_LEVEL_LIST] = {log_nmgr_level_list, NULL},
[LOGS_NMGR_OP_LOGS_LIST] = {log_nmgr_logs_list, NULL},
+#if MYNEWT_VAL(LOG_STORAGE_WATERMARK)
[LOGS_NMGR_OP_SET_WATERMARK] = {log_nmgr_set_watermark, NULL},
+#endif
};
struct log_encode_data {
@@ -583,6 +587,7 @@ log_nmgr_clear(struct mgmt_cbuf *cb)
return 0;
}
+#if MYNEWT_VAL(LOG_STORAGE_WATERMARK)
static int
log_nmgr_set_watermark(struct mgmt_cbuf *cb)
{
@@ -655,6 +660,7 @@ log_nmgr_set_watermark(struct mgmt_cbuf *cb)
return (rc);
}
+#endif
/**
* Register nmgr group handlers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services