}
}
-static void cleanup_db(void) {
+static int cleanup_db(void) {
_cleanup_closedir_ DIR *dir1 = NULL, *dir2 = NULL, *dir3 = NULL, *dir4 = NULL;
dir1 = opendir("/run/udev/data");
/* Do not remove /run/udev/watch. It will be handled by udevd well on restart.
* And should not be removed by external program when udevd is running. */
+
+ return 0;
}
static int query_device(QueryType query, sd_device* device) {
if (r <= 0)
return r;
- if (arg_action_type == ACTION_CLEANUP_DB) {
- cleanup_db();
- return 0;
- }
+ if (arg_action_type == ACTION_CLEANUP_DB)
+ return cleanup_db();
if (arg_action_type == ACTION_DEVICE_ID_FILE)
return stat_device(arg_name, arg_export, arg_export_prefix);