Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144207314
D35581.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35581.id.diff
View Options
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -110,13 +110,15 @@
* Command table entry.
*/
struct db_command {
- char * name; /* command name */
+ char *name; /* command name */
db_cmdfcn_t *fcn; /* function to call */
- int flag; /* extra info: */
+ int flag;
#define CS_OWN 0x1 /* non-standard syntax */
#define CS_MORE 0x2 /* standard syntax, but may have other words
* at end */
#define CS_SET_DOT 0x100 /* set dot after command */
+#define DB_CMD_MEMSAFE 0x1000 /* Command does not allow reads or writes to
+ * arbitrary memory. */
struct db_command_table *more; /* another level of command */
LIST_ENTRY(db_command) next; /* next entry in the command table */
};
@@ -180,10 +182,12 @@
_DB_SET(_show, alias_name, func_name, db_show_table, flags, NULL)
#define DB_SHOW_ALIAS(alias_name, func_name) \
DB_SHOW_ALIAS_FLAGS(alias_name, func_name, 0)
-#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \
- _DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL)
-#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \
- _DB_SET(_show_all, alias_name, func_name, db_show_all_table, 0, NULL)
+#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \
+ _DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, \
+ DB_CMD_MEMSAFE, NULL)
+#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \
+ _DB_SET(_show_all, alias_name, func_name, db_show_all_table, \
+ DB_CMD_MEMSAFE, NULL)
extern db_expr_t db_maxoff;
extern int db_indent;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 7, 12:04 PM (7 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28455266
Default Alt Text
D35581.id.diff (1 KB)
Attached To
Mode
D35581: ddb: add the DB_CMD_MEMSAFE flag for commands
Attached
Detach File
Event Timeline
Log In to Comment