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

Function db_script_unset

freebsd/ddb/db_script.c:212–223  ·  view source on GitHub ↗

* Delete an existing script by name, if found. */

Source from the content-addressed store, hash-verified

210 * Delete an existing script by name, if found.
211 */
212static int
213db_script_unset(const char *scriptname)
214{
215 struct ddb_script *dsp;
216
217 dsp = db_script_lookup(scriptname);
218 if (dsp == NULL)
219 return (ENOENT);
220 strcpy(dsp->ds_scriptname, "");
221 strcpy(dsp->ds_script, "");
222 return (0);
223}
224
225/*
226 * Trim leading/trailing white space in a command so that we don't pass

Callers 2

db_unscript_cmdFunction · 0.85

Calls 1

db_script_lookupFunction · 0.85

Tested by

no test coverage detected