diff options
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1723,7 +1723,8 @@ static int og_cmd_get_client_setup(json_t *element, int filesystem; int format; int os; - int used_size; + uint64_t used_size; + uint64_t free_size; int image; int software; } partition; @@ -1761,8 +1762,8 @@ static int og_cmd_get_client_setup(json_t *element, result = dbi_conn_queryf(dbi->conn, "SELECT numdisk, numpar, codpar, tamano, " - " uso, idsistemafichero, idnombreso, " - " idimagen, idperfilsoft " + " idsistemafichero, idnombreso, " + " idimagen, idperfilsoft, used_size, free_size " "FROM ordenadores_particiones " "INNER JOIN ordenadores " "ON ordenadores.idordenador = ordenadores_particiones.idordenador " @@ -1784,11 +1785,12 @@ static int og_cmd_get_client_setup(json_t *element, partition.number = dbi_result_get_int(result, "numpar"); partition.code = dbi_result_get_int(result, "codpar"); partition.size = dbi_result_get_longlong(result, "tamano"); - partition.used_size = dbi_result_get_int(result, "uso"); partition.filesystem = dbi_result_get_int(result, "idsistemafichero"); partition.os = dbi_result_get_int(result, "idnombreso"); partition.image = dbi_result_get_int(result, "idimagen"); partition.software = dbi_result_get_int(result, "idperfilsoft"); + partition.used_size = dbi_result_get_longlong(result, "used_size"); + partition.free_size = dbi_result_get_longlong(result, "free_size"); partition_json = json_object(); if (!partition_json) { @@ -1808,6 +1810,8 @@ static int og_cmd_get_client_setup(json_t *element, json_integer(partition.size)); json_object_set_new(partition_json, "used_size", json_integer(partition.used_size)); + json_object_set_new(partition_json, "free_size", + json_integer(partition.free_size)); json_object_set_new(partition_json, "filesystem", json_integer(partition.filesystem)); json_object_set_new(partition_json, "os", |