forked from enlightenment/enlightenment
report error from system() calls that dont run cleanly - warn fix
This commit is contained in:
parent
d68cb82a32
commit
a57aa83793
|
@ -77,7 +77,8 @@ _do_profile(E_Desk *desk, E_Randr2_Screen *sc)
|
|||
"%s/enlightenment/utils/enlightenment_elm_cfgtool "
|
||||
"set %s %s 'scale-mul %i'",
|
||||
e_prefix_lib_get(), sc->config.profile, buf, scale);
|
||||
system(buf2);
|
||||
if (system(buf2) != 0)
|
||||
ERR("Error code from trying to run \"%s\"", buf2);
|
||||
}
|
||||
}
|
||||
desk->window_profile = eina_stringshare_add(buf);
|
||||
|
|
|
@ -86,7 +86,8 @@ _cpuclock_set_governor(const char *governor)
|
|||
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s %s %s", exe, "governor", governor);
|
||||
system(buf);
|
||||
if (system(buf) != 0)
|
||||
ERR("Error code from trying to run \"%s\"", buf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -104,14 +105,16 @@ _cpuclock_set_frequency(int frequency)
|
|||
e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
|
||||
if (stat(exe, &st) < 0) return;
|
||||
snprintf(buf, sizeof(buf), "%s %d", exe, frequency);
|
||||
system(buf);
|
||||
if (system(buf) != 0)
|
||||
ERR("Error code from trying to run \"%s\"", buf);
|
||||
#else
|
||||
snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
|
||||
e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
|
||||
if (stat(exe, &st) < 0) return;
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s %s %i", exe, "frequency", frequency);
|
||||
system(buf);
|
||||
if (system(buf) != 0)
|
||||
ERR("Error code from trying to run \"%s\"", buf);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -129,7 +132,8 @@ _cpuclock_set_pstate(int min, int max, int turbo)
|
|||
if (stat(exe, &st) < 0) return;
|
||||
snprintf(buf, sizeof(buf),
|
||||
"%s %s %i %i %i", exe, "pstate", min, max, turbo);
|
||||
system(buf);
|
||||
if (system(buf) != 0)
|
||||
ERR("Error code from trying to run \"%s\"", buf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue