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

Function db_unscript_cmd

freebsd/ddb/db_script.c:431–451  ·  view source on GitHub ↗

* Remove a named script. */

Source from the content-addressed store, hash-verified

429 * Remove a named script.
430 */
431void
432db_unscript_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
433 char *modif)
434{
435 int error, t;
436
437 t = db_read_token();
438 if (t != tIDENT) {
439 db_printf("?\n");
440 db_skip_to_eol();
441 return;
442 }
443
444 error = db_script_unset(db_tok_string);
445 if (error == ENOENT) {
446 db_printf("script '%s' not found\n", db_tok_string);
447 db_skip_to_eol();
448 return;
449 }
450 db_skip_to_eol();
451}
452
453/*
454 * Sysctls for managing DDB scripting:

Callers

nothing calls this directly

Calls 4

db_read_tokenFunction · 0.85
db_printfFunction · 0.85
db_skip_to_eolFunction · 0.85
db_script_unsetFunction · 0.85

Tested by

no test coverage detected