|
|
|
@ -31,7 +31,7 @@ void load_template_load_cfg(config_all* _all_config, char* cmd) {
|
|
|
|
|
model_null_str_writing(_config);
|
|
|
|
|
_config->loaded_keys = yon_char_new(str_key);
|
|
|
|
|
load_pars_keys(_config, yon_char_new(str_key), index);
|
|
|
|
|
load_pars_values(_config, yon_char_new(str_value), index);
|
|
|
|
|
load_pars_values(_config, _all_config,str_key, yon_char_new(str_value), index);
|
|
|
|
|
|
|
|
|
|
if (strstr(str_key, "prjquota")) {
|
|
|
|
|
_all_config->v_project.pfVectorAdd(&_all_config->v_project,_config);
|
|
|
|
@ -131,16 +131,16 @@ void load_pars_keys_p(config_u_g_p* _config, char* str_key, int index) {
|
|
|
|
|
void load_pars_values_status(disk_status* _config, char* key, char* value) {
|
|
|
|
|
_config->device = yon_char_new(key);
|
|
|
|
|
if (strstr(value,"enable")) {
|
|
|
|
|
_config->status = 1;
|
|
|
|
|
_config->status = 2;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if (strstr(value,"disable")) {
|
|
|
|
|
_config->status = 0;
|
|
|
|
|
_config->status = 1;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void load_pars_values(config_u_g_p* _config, char* str_value, int index) {
|
|
|
|
|
void load_pars_values(config_u_g_p* _config, config_all* _all_config, char* str_key, char* str_value, int index) {
|
|
|
|
|
int size_array_size_pow = 0;
|
|
|
|
|
char** array_size_pow = NULL;
|
|
|
|
|
array_size_pow = yon_char_parsed_append(array_size_pow,&size_array_size_pow, STR_KB);
|
|
|
|
@ -166,6 +166,26 @@ void load_pars_values(config_u_g_p* _config, char* str_value, int index) {
|
|
|
|
|
philos_set_size_memory_integer("-", &_config->deferring_size);
|
|
|
|
|
philos_set_size_memory_integer("-", &_config->deferring_file);
|
|
|
|
|
}
|
|
|
|
|
for (int j=0; j < _all_config->v_disk_status.vectorList.total;j++) {
|
|
|
|
|
disk_status* config_disk_status = (disk_status*)_all_config->v_disk_status.pfVectorGet(&_all_config->v_disk_status, j);
|
|
|
|
|
if (strstr(str_key, config_disk_status->device)){
|
|
|
|
|
config_disk_status->deferring_file = _config->deferring_file;
|
|
|
|
|
config_disk_status->deferring_size = _config->deferring_size;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (int index = 0; index < get_device_vec()->vectorList.total; index++) {
|
|
|
|
|
device_config* _config_disk = (device_config*)get_device_vec()->pfVectorGet(get_device_vec(), index);
|
|
|
|
|
for (int j=0; j < _all_config->v_disk_status.vectorList.total;j++) {
|
|
|
|
|
disk_status* config_disk_status = (disk_status*)_all_config->v_disk_status.pfVectorGet(&_all_config->v_disk_status, j);
|
|
|
|
|
if (strstr(config_disk_status->device, _config_disk->name_disk)) {
|
|
|
|
|
config_disk_status->device = _config_disk->name_disk;
|
|
|
|
|
config_disk_status->fs = _config_disk->file_system;
|
|
|
|
|
config_disk_status->mount_point = _config_disk->mounted;
|
|
|
|
|
config_disk_status->name = _config_disk->type_dick;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|