X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Ffrontend%2Fgrammar.y;h=a2ae448cc744166875afd8e0f4904b5a186ad5cf;hp=a444423b409ce6854190b5d9e9ef7812fe702a5a;hb=b4d485cde96751e1ec832d0e75a3e6081006a1a4;hpb=05f8e6e8f6132ef71e51280a75a9ad9aa0c00665 diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y index a444423..a2ae448 100644 --- a/src/frontend/grammar.y +++ b/src/frontend/grammar.y @@ -206,11 +206,12 @@ statement: * Retrieve detailed information about a single host. */ fetch_statement: - FETCH STRING + FETCH STRING filter_clause { $$ = SDB_CONN_NODE(sdb_object_create_dT(/* name = */ NULL, conn_fetch_t, conn_fetch_destroy)); CONN_FETCH($$)->name = strdup($2); + CONN_FETCH($$)->filter = CONN_MATCHER($3); $$->cmd = CONNECTION_FETCH; free($2); $2 = NULL; } @@ -222,10 +223,11 @@ fetch_statement: * Returns a list of all hosts in the store. */ list_statement: - LIST + LIST filter_clause { - $$ = SDB_CONN_NODE(sdb_object_create_T(/* name = */ NULL, - sdb_conn_node_t)); + $$ = SDB_CONN_NODE(sdb_object_create_dT(/* name = */ NULL, + conn_list_t, conn_list_destroy)); + CONN_LIST($$)->filter = CONN_MATCHER($2); $$->cmd = CONNECTION_LIST; } ;