|
|
|
|
@ -170,3 +170,16 @@ void yon_launch(char *command)
|
|
|
|
|
{
|
|
|
|
|
int ansver = system(command);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define os_name_get_command "sed -En 's/^PRETTY_NAME=[\"]*([^\"]+)[\"]*/\\1/p' /etc/os-release"
|
|
|
|
|
char *yon_ubl_get_os_name(){
|
|
|
|
|
char *os_name = NULL;
|
|
|
|
|
int size;
|
|
|
|
|
config_str ret = yon_config_load(os_name_get_command,&size);
|
|
|
|
|
if (size){
|
|
|
|
|
yon_char_remove_last_symbol(ret[0],'\n');
|
|
|
|
|
os_name = yon_char_new(ret[0]);
|
|
|
|
|
yon_char_parsed_free(ret,size);
|
|
|
|
|
}
|
|
|
|
|
return os_name;
|
|
|
|
|
}
|