MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_run_cmd

Function db_run_cmd

freebsd/ddb/db_script.c:361–378  ·  view source on GitHub ↗

* Execute a script. */

Source from the content-addressed store, hash-verified

359 * Execute a script.
360 */
361void
362db_run_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
363{
364 int t;
365
366 /*
367 * Right now, we accept exactly one argument. In the future, we
368 * might want to accept flags and arguments to the script itself.
369 */
370 t = db_read_token();
371 if (t != tIDENT)
372 db_error("?\n");
373
374 if (db_read_token() != tEOL)
375 db_error("?\n");
376
377 db_script_exec(db_tok_string, 1);
378}
379
380/*
381 * Print or set a named script, with the set portion broken out into its own

Callers

nothing calls this directly

Calls 3

db_read_tokenFunction · 0.85
db_errorFunction · 0.85
db_script_execFunction · 0.85

Tested by

no test coverage detected