|
|
|
|
70
|
device->num_targets = new_num_targets;
|
70
|
device->num_targets = new_num_targets;
|
71
|
}
|
71
|
}
|
72
|
|
72
|
|
73
|
-static bool light_rc_initialize(light_context_t *new_ctx) {
|
|
|
|
|
73
|
+static bool _light_rc_initialize(light_context_t *new_ctx) {
|
74
|
// Setup the configuration folder
|
74
|
// Setup the configuration folder
|
75
|
// If we are root, use the system-wide configuration folder, otherwise try to find a user-specific folder, or fall back to ~/.config
|
75
|
// If we are root, use the system-wide configuration folder, otherwise try to find a user-specific folder, or fall back to ~/.config
|
76
|
uid_t euid = geteuid();
|
76
|
uid_t euid = geteuid();
|
|
|
|
|
105
|
|
105
|
|
106
|
static void _light_get_target_path(light_context_t* ctx, char* output_path, size_t output_size)
|
106
|
static void _light_get_target_path(light_context_t* ctx, char* output_path, size_t output_size)
|
107
|
{
|
107
|
{
|
108
|
- if (light_rc_initialize(ctx)) {
|
|
|
|
|
108
|
+ if (_light_rc_initialize(ctx)) {
|
109
|
snprintf(output_path, output_size, "%s/targets/%s/%s/%s",
|
109
|
snprintf(output_path, output_size, "%s/targets/%s/%s/%s",
|
110
|
ctx->sys_params.conf_dir,
|
110
|
ctx->sys_params.conf_dir,
|
111
|
ctx->run_params.device_target->device->enumerator->name,
|
111
|
ctx->run_params.device_target->device->enumerator->name,
|
|
|
|
|
116
|
|
116
|
|
117
|
static void _light_get_target_file(light_context_t* ctx, char* output_path, size_t output_size, char const * file)
|
117
|
static void _light_get_target_file(light_context_t* ctx, char* output_path, size_t output_size, char const * file)
|
118
|
{
|
118
|
{
|
119
|
- if (light_rc_initialize(ctx)) {
|
|
|
|
|
119
|
+ if (_light_rc_initialize(ctx)) {
|
120
|
snprintf(output_path, output_size, "%s/targets/%s/%s/%s/%s",
|
120
|
snprintf(output_path, output_size, "%s/targets/%s/%s/%s/%s",
|
121
|
ctx->sys_params.conf_dir,
|
121
|
ctx->sys_params.conf_dir,
|
122
|
ctx->run_params.device_target->device->enumerator->name,
|
122
|
ctx->run_params.device_target->device->enumerator->name,
|