From a716abbe477f585d709ab3678c61b111e68660be Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Mon, 3 Jul 2023 17:52:37 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83=20=D1=81=20=D0=B3?= =?UTF-8?q?=D1=80=D1=83=D0=BF=D0=BF=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-resourcequota.c | 17 +---------------- source/ubl-settings-resourcequota.h | 1 - source/view_add.c | 10 +--------- ubl-settings-resourcequota.glade | 4 +--- 4 files changed, 3 insertions(+), 29 deletions(-) diff --git a/source/ubl-settings-resourcequota.c b/source/ubl-settings-resourcequota.c index bc87ac7..703fa5d 100644 --- a/source/ubl-settings-resourcequota.c +++ b/source/ubl-settings-resourcequota.c @@ -244,14 +244,10 @@ void main_update_information() { } else if (menu_id == 1) { - fill_cmb_2 = yon_config_load(CMD_GET_GROUP, &size); - philos_array_string_remove_char(&fill_cmb_2, "\n", size); - } - else if (menu_id == 2) { fill_cmb_2 = philos_pars_terminal_systemd_cgls(CMD_GET_SLICE_SERVICE, ".service", &size); philos_array_string_remove_char(&fill_cmb_2, "\n", size); } - else if (menu_id == 3) { + else if (menu_id == 2) { fill_cmb_2 = philos_pars_terminal_systemd_cgls(CMD_GET_SLICE_SERVICE, ".slice", &size); philos_array_string_remove_char(&fill_cmb_2, "\n", size); } @@ -421,15 +417,6 @@ void str_split_key(char* source_value, int index) { main_config.type_quota = yon_char_parsed_append(main_config.type_quota, &index, STR_USER); index--; } - // Группа - else { - main_config.type_quota_size = philos_int_append(main_config.type_quota_size, &index, 1); - index--; - main_config.quota_volume = yon_char_parsed_append(main_config.quota_volume, &index, value); - index--; - main_config.type_quota = yon_char_parsed_append(main_config.type_quota, &index, STR_GROUP); - index--; - } } } @@ -1280,8 +1267,6 @@ int main(int argc, char *argv[]){ main_config.lock_save_local=1; } gtk_init(&argc,&argv); - - add_get_cmd_group(CMD_GET_GROUP); add_get_systemd_cgls(CMD_GET_SLICE_SERVICE); gtk_init(&argc,&argv); device_disk_parsed(); diff --git a/source/ubl-settings-resourcequota.h b/source/ubl-settings-resourcequota.h index bdb4c82..e065fe1 100755 --- a/source/ubl-settings-resourcequota.h +++ b/source/ubl-settings-resourcequota.h @@ -42,7 +42,6 @@ #define CMD_REMOVE_SYSTEM "ubconfig --target system remove security " #define CMD_GET_SLICE_SERVICE "systemd-cgls --no-page" -#define CMD_GET_GROUP "cut -d: -f1 /etc/group" typedef char *string; string version_application; diff --git a/source/view_add.c b/source/view_add.c index 772fa99..beffe5a 100644 --- a/source/view_add.c +++ b/source/view_add.c @@ -126,10 +126,6 @@ void add_event(temp_set_window *widgets) { g_signal_connect(G_OBJECT(widgets->chbTempWrite), "toggled", G_CALLBACK(event_check_io_device), NULL); } - -void add_get_cmd_group(char* cmd_get_group) { - CMD_GET_GROUP = cmd_get_group; -} void add_get_systemd_cgls(char* cmd_systemd_cgls) { CMD_GET_SLICE_SERVICE = cmd_systemd_cgls; } @@ -283,14 +279,10 @@ void add_update_combo_box() { } else if (menu_id == 1) { - fill_cmb_2 = yon_config_load(CMD_GET_GROUP, &size); - philos_array_string_remove_char(&fill_cmb_2, "\n", size); - } - else if (menu_id == 2) { fill_cmb_2 = philos_pars_terminal_systemd_cgls(CMD_GET_SLICE_SERVICE, ".service", &size); philos_array_string_remove_char(&fill_cmb_2, "\n", size); } - else if (menu_id == 3) { + else if (menu_id == 2) { fill_cmb_2 = philos_pars_terminal_systemd_cgls(CMD_GET_SLICE_SERVICE, ".slice", &size); philos_array_string_remove_char(&fill_cmb_2, "\n", size); } diff --git a/ubl-settings-resourcequota.glade b/ubl-settings-resourcequota.glade index 8bcbe70..d920255 100644 --- a/ubl-settings-resourcequota.glade +++ b/ubl-settings-resourcequota.glade @@ -1,5 +1,5 @@ - + @@ -256,7 +256,6 @@ 0 User - Group Process Slice @@ -3538,7 +3537,6 @@ limit 0 User - Group Process Slice