Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4ae3075
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Mar 17, 2026
fc12317
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Mar 17, 2026
47b312e
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Mar 25, 2026
64787a6
Merge branch 'develop' into topic/RDKEMW-15498
mkadinti Mar 26, 2026
7c650c3
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Mar 26, 2026
b472bc0
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Mar 30, 2026
1226c0e
Move KnowWhereItBreaks to kwib_src/, rename binary to kwib_test_utili…
mkadinti Mar 30, 2026
6e1bc70
Apply suggestion from @Copilot
mkadinti Mar 31, 2026
ad35011
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Mar 31, 2026
0662782
Merge branch 'topic/RDKEMW-15498' of https://github.com/rdkcentral/rd…
mkadinti Mar 31, 2026
450d4f3
Merge branch 'develop' into topic/RDKEMW-15498
mkadinti Apr 1, 2026
0ed861d
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 1, 2026
7d5e420
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 1, 2026
f86ee32
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 1, 2026
e855a7f
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 1, 2026
1c975e1
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 1, 2026
1f6bc0a
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 1, 2026
5561bc7
Merge branch 'develop' into topic/RDKEMW-15498
mkadinti Apr 5, 2026
ab27097
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 6, 2026
152e7eb
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 7, 2026
b7eee0d
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 9, 2026
930bb98
RDKEMW-15498:Implement software update service layer library (Fix rev…
mkadinti Apr 10, 2026
c89e440
Daemon failing to start, leading to Initial validation failed
mkadinti Apr 13, 2026
2f602c0
Apply suggestion from @Copilot
mkadinti Apr 15, 2026
06cd875
Revert "RDKEMW-15498:Implement software update service layer library …
mkadinti Apr 15, 2026
219a23a
RDKEMW-16887:Daemon failing to start, leading to Initial validation f…
mkadinti Apr 15, 2026
8ca692b
RDKEMW-16887:Daemon failing to start, leading to Initial validation f…
mkadinti Apr 15, 2026
08f0417
Merge pull request #235 from rdkcentral/RDKEMW-16887
mkadinti Apr 15, 2026
f140075
[Xione UK] : Logging format in FWUPG module is inconsistent
mkadinti Apr 21, 2026
7b59417
RDKEMW-17114:[Xione UK] Logging format in FWUPG module is inconsistent
mkadinti Apr 21, 2026
f9a59a2
RDKEMW-17114:[Xione UK]Logging format in FWUPG module is inconsistent
mkadinti Apr 22, 2026
d0ced8f
RDKEMW-17114:[Xione UK]Logging format in FWUPG module is inconsistent
mkadinti Apr 22, 2026
f11c7f4
RDKEMW-17114:[Xione UK]Logging format in FWUPG module is inconsistent
mkadinti Apr 22, 2026
53cb5a9
Apply suggestion from @Copilot
mkadinti Apr 22, 2026
6981519
Delete PID-Based_Ownership.md
mkadinti Apr 22, 2026
dd6830e
RDKEMW-17114:[Xione UK]Logging format in FWUPG module is inconsistent…
mkadinti Apr 24, 2026
b30be6f
Merge branch 'topic/RDKEMW-17114' of https://github.com/rdkcentral/rd…
mkadinti Apr 24, 2026
e3908da
Merge pull request #237 from rdkcentral/topic/RDKEMW-17114
mkadinti Apr 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,13 @@ include_HEADERS = \

librdkFwupdateMgr_la_SOURCES = \
${top_srcdir}/librdkFwupdateMgr/src/rdkFwupdateMgr_process.c \
${top_srcdir}/librdkFwupdateMgr/src/rdkFwupdateMgr_log.c \
${top_srcdir}/librdkFwupdateMgr/src/rdkFwupdateMgr_async.c \
${top_srcdir}/librdkFwupdateMgr/src/rdkFwupdateMgr_api.c

librdkFwupdateMgr_la_CFLAGS = -fPIC -I${top_srcdir}/librdkFwupdateMgr/include -I${top_srcdir}/librdkFwupdateMgr/src $(AM_CFLAGS) $(GLIB_CFLAGS)
librdkFwupdateMgr_la_CPPFLAGS = -fPIC -I${top_srcdir}/librdkFwupdateMgr/include -I${top_srcdir}/librdkFwupdateMgr/src $(GLIB_CFLAGS)
librdkFwupdateMgr_la_CFLAGS = -fPIC -I${top_srcdir}/librdkFwupdateMgr/include -I${top_srcdir}/librdkFwupdateMgr/src -I${top_srcdir}/common_utilities/utils $(AM_CFLAGS) $(GLIB_CFLAGS)
librdkFwupdateMgr_la_CPPFLAGS = -fPIC -I${top_srcdir}/librdkFwupdateMgr/include -I${top_srcdir}/librdkFwupdateMgr/src -I${top_srcdir}/common_utilities/utils $(GLIB_CFLAGS)
Comment on lines +187 to +188
librdkFwupdateMgr_la_LDFLAGS = -shared -version-info 1:0:0
librdkFwupdateMgr_la_LIBADD = $(GLIB_LIBS) -lpthread
librdkFwupdateMgr_la_LIBADD = $(GLIB_LIBS) -lpthread -lfwutils

librdkFwupdateMgr_include_HEADERS = \
${top_srcdir}/librdkFwupdateMgr/include/rdkFwupdateMgr_client.h
Expand Down Expand Up @@ -258,13 +257,17 @@ example_plugin_SOURCES = \

example_plugin_CFLAGS = \
-I${top_srcdir}/librdkFwupdateMgr/include \
-I${top_srcdir}/librdkFwupdateMgr/src \
-I${top_srcdir}/common_utilities/utils \
$(AM_CFLAGS) \
$(GLIB_CFLAGS)

example_plugin_LDADD = \
librdkFwupdateMgr.la \
$(GLIB_LIBS) \
-lpthread
-lpthread \
-lfwutils \
-lrdkloggers

example_plugin_LDFLAGS = \
-L$(PKG_CONFIG_SYSROOT_DIR)/$(libdir)
Expand Down
213 changes: 107 additions & 106 deletions librdkFwupdateMgr/examples/example_app.c

Large diffs are not rendered by default.

886 changes: 674 additions & 212 deletions librdkFwupdateMgr/src/rdkFwupdateMgr_api.c

Large diffs are not rendered by default.

2,349 changes: 1,372 additions & 977 deletions librdkFwupdateMgr/src/rdkFwupdateMgr_async.c

Large diffs are not rendered by default.

673 changes: 452 additions & 221 deletions librdkFwupdateMgr/src/rdkFwupdateMgr_async_internal.h

Large diffs are not rendered by default.

159 changes: 0 additions & 159 deletions librdkFwupdateMgr/src/rdkFwupdateMgr_log.c

This file was deleted.

116 changes: 39 additions & 77 deletions librdkFwupdateMgr/src/rdkFwupdateMgr_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,102 +20,64 @@
* @file rdkFwupdateMgr_log.h
* @brief Logging macros for librdkFwupdateMgr client library
*
* This header provides logging macros that write to /opt/logs/rdkFwupdateMgr.log
* using the RDK logger infrastructure, similar to SWLOG_* macros used in the daemon.
* FWUPMGR_* macros log directly with the "LOG.RDK.FWUPMGR" module
* (when RDK_LOGGER is enabled) so that library log lines appear as
* "[FWUPMGR]" in the output clearly distinguishable from daemon
* logs ("[FWUPG]") and common-utility logs ("[COMMONUTILITIES]")
* without any redundant double-tagging.
*
* The hosting application (example_plugin, unit-test harness, etc.)
* is responsible for calling log_init() before using this library
* and log_exit() on shutdown. The library does NOT own the log
* lifecycle.
*
* Usage:
* FWUPMGR_INFO("Registered with handler: %s\n", handler_id);
* FWUPMGR_ERROR("Registration failed: %s\n", error_msg);
* FWUPMGR_DEBUG("D-Bus proxy created: %p\n", proxy);
*/

#ifndef RDKFWUPDATEMGR_LOG_H
#define RDKFWUPDATEMGR_LOG_H

#include <stdio.h>
#include <stdarg.h>
#include "rdkv_cdl_log_wrapper.h" /* SWLOG_*, log_init(), log_exit() */

#ifdef __cplusplus
extern "C" {
#endif

/* ========================================================================
* LOGGING CONFIGURATION
* Library code uses FWUPMGR_* macros - logs as [FWUPMGR]
* Example app defines EXAMPLE_* macros - logs as [EXAMPLE]
* ======================================================================== */

/** Log file path - same as daemon for consistent logging */
#define FWUPMGR_LOG_FILE "/opt/logs/rdkFwupdateMgr.log"

/** Log module name for identification */
#define FWUPMGR_LOG_MODULE "librdkFwupdateMgr"

/* ========================================================================
* LOGGING API
* ======================================================================== */

/**
* @brief Initialize logging for the library
*
* Opens the log file for appending. Should be called once at library init.
* Safe to call multiple times (no-op after first call).
*/
void fwupmgr_log_init(void);

/**
* @brief Close logging resources
*
* Closes the log file. Should be called at library cleanup.
* Safe to call multiple times (no-op if already closed).
*/
void fwupmgr_log_close(void);

/**
* @brief Internal logging function
*
* @param level Log level string ("INFO", "ERROR", "DEBUG", "WARN")
* @param format Printf-style format string
* @param ... Variable arguments for format string
*/
void fwupmgr_log_internal(const char *level, const char *format, ...);
#if defined(RDK_LOGGER)
#include "rdk_debug.h"

/* ========================================================================
* LOGGING MACROS - Same pattern as SWLOG_* in daemon
* ======================================================================== */
/* Generic base macro callers provide their own module name */
#define FWUPMGR_LOG(level, module, format, ...) \
RDK_LOG(level, module, format, ##__VA_ARGS__)

/**
* @brief Log informational message
*
* Usage: FWUPMGR_INFO("Registered with handler: %s\n", handler_id);
*/
#define FWUPMGR_INFO(format, ...) \
fwupmgr_log_internal("INFO", "[%s:%d] " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
/* Default library macros use LOG.RDK.FWUPMGR */
#define FWUPMGR_TRACE(format, ...) FWUPMGR_LOG(RDK_LOG_TRACE1, "LOG.RDK.FWUPMGR", format, ##__VA_ARGS__)
#define FWUPMGR_DEBUG(format, ...) FWUPMGR_LOG(RDK_LOG_DEBUG, "LOG.RDK.FWUPMGR", format, ##__VA_ARGS__)
#define FWUPMGR_INFO(format, ...) FWUPMGR_LOG(RDK_LOG_INFO, "LOG.RDK.FWUPMGR", format, ##__VA_ARGS__)
#define FWUPMGR_WARN(format, ...) FWUPMGR_LOG(RDK_LOG_WARN, "LOG.RDK.FWUPMGR", format, ##__VA_ARGS__)
#define FWUPMGR_ERROR(format, ...) FWUPMGR_LOG(RDK_LOG_ERROR, "LOG.RDK.FWUPMGR", format, ##__VA_ARGS__)
#define FWUPMGR_FATAL(format, ...) FWUPMGR_LOG(RDK_LOG_FATAL, "LOG.RDK.FWUPMGR", format, ##__VA_ARGS__)

/**
* @brief Log error message
*
* Usage: FWUPMGR_ERROR("Registration failed: %s\n", error_msg);
*/
#define FWUPMGR_ERROR(format, ...) \
fwupmgr_log_internal("ERROR", "[%s:%d] " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else

/**
* @brief Log debug message
*
* Usage: FWUPMGR_DEBUG("D-Bus proxy created: %p\n", proxy);
*/
#define FWUPMGR_DEBUG(format, ...) \
fwupmgr_log_internal("DEBUG", "[%s:%d] " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)

/**
* @brief Log warning message
*
* Usage: FWUPMGR_WARN("Daemon not responding, retry recommended\n");
*/
#define FWUPMGR_WARN(format, ...) \
fwupmgr_log_internal("WARN", "[%s:%d] " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
/* Default library macros */
#define FWUPMGR_TRACE(FORMAT...) FWUPMGR_LOG(FWUPMGR_LOG_INFO, "FWUPMGR", FORMAT)
#define FWUPMGR_DEBUG(FORMAT...) FWUPMGR_LOG(FWUPMGR_LOG_INFO, "FWUPMGR", FORMAT)
#define FWUPMGR_INFO(FORMAT...) FWUPMGR_LOG(FWUPMGR_LOG_INFO, "FWUPMGR", FORMAT)
#define FWUPMGR_WARN(FORMAT...) FWUPMGR_LOG(FWUPMGR_LOG_INFO, "FWUPMGR", FORMAT)
#define FWUPMGR_ERROR(FORMAT...) FWUPMGR_LOG(FWUPMGR_LOG_INFO, "FWUPMGR", FORMAT)
#define FWUPMGR_FATAL(FORMAT...) FWUPMGR_LOG(FWUPMGR_LOG_INFO, "FWUPMGR", FORMAT)
Comment on lines +54 to +78

/**
* @brief Log fatal error message
*
* Usage: FWUPMGR_FATAL("Out of memory, cannot continue\n");
*/
#define FWUPMGR_FATAL(format, ...) \
fwupmgr_log_internal("FATAL", "[%s:%d] " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#endif

#ifdef __cplusplus
}
Expand Down
Loading
Loading