uci: expose rpc_uci_purge_savedirs() helper
This commit is contained in:
parent
524032c291
commit
fc1b008e08
2 changed files with 3 additions and 3 deletions
|
@ -32,4 +32,6 @@
|
||||||
|
|
||||||
int rpc_uci_api_init(struct ubus_context *ctx);
|
int rpc_uci_api_init(struct ubus_context *ctx);
|
||||||
|
|
||||||
|
void rpc_uci_purge_savedirs(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
4
uci.c
4
uci.c
|
@ -1159,8 +1159,7 @@ rpc_uci_purge_savedir_cb(struct rpc_session *ses, void *priv)
|
||||||
* Removes all delta directories which match the /tmp/.uci-rpc-* pattern.
|
* Removes all delta directories which match the /tmp/.uci-rpc-* pattern.
|
||||||
* This is used to clean up garbage when starting rpcd.
|
* This is used to clean up garbage when starting rpcd.
|
||||||
*/
|
*/
|
||||||
static void
|
void rpc_uci_purge_savedirs(void)
|
||||||
rpc_uci_purge_savedirs(void)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
glob_t gl;
|
glob_t gl;
|
||||||
|
@ -1208,7 +1207,6 @@ int rpc_uci_api_init(struct ubus_context *ctx)
|
||||||
if (!cursor)
|
if (!cursor)
|
||||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||||
|
|
||||||
rpc_uci_purge_savedirs();
|
|
||||||
rpc_session_destroy_cb(&cb);
|
rpc_session_destroy_cb(&cb);
|
||||||
|
|
||||||
return ubus_add_object(ctx, &obj);
|
return ubus_add_object(ctx, &obj);
|
||||||
|
|
Loading…
Add table
Reference in a new issue