#include "ubconfig_quotas.h" namespace Quotas_ubconfig { void Quotas_ubconfig::format_cmd_quotas(struct struct_quotas& _struct_quota) { string key = "DISK_QUOTA["; key += ":" + _struct_quota.device + "]"; string value = _struct_quota.name + ":" + _struct_quota.cmd; (*map_gui_cfg)[key] = value; } bool Quotas_ubconfig::off_quota(string partition, string quota_type, string state) { string key = "DISK_QUOTA[" + quota_type + ":" + partition + "]"; string value = "disable"; (*map_gui_cfg)[key] = state; return true; } void Quotas_ubconfig::set_map_gui(map_str_str &map_gui) { map_gui_cfg = &map_gui; } Quotas_ubconfig::Quotas_ubconfig() { map_hw_or_sw["ext2"] = "hw"; map_hw_or_sw["ext3"] = "hw"; map_hw_or_sw["nfs"] = "sw"; map_hw_or_sw["NFS"] = "sw"; } }