kernel/ddb: Add a DB_COMMAND_FLAG() macro to set the flag, too.
authorSascha Wildner <saw@online.de>
Tue, 5 May 2015 17:59:36 +0000 (19:59 +0200)
committerSascha Wildner <saw@online.de>
Tue, 5 May 2015 17:59:36 +0000 (19:59 +0200)
share/man/man9/DB_COMMAND.9
share/man/man9/Makefile
sys/ddb/ddb.h
sys/dev/disk/aic7xxx/aic79xx_osm.c

index 1155855..2a50f13 100644 (file)
 .\"
 .\" $FreeBSD: src/share/man/man9/DB_COMMAND.9,v 1.6 2012/05/20 16:43:47 gjb Exp $
 .\"
-.Dd July 1, 2012
+.Dd May 5, 2015
 .Dt DB_COMMAND 9
 .Os
 .Sh NAME
 .Nm DB_COMMAND ,
+.Nm DB_COMMAND_FLAG ,
 .Nm DB_SHOW_COMMAND
 .Nd Extends the ddb command set
 .Sh SYNOPSIS
 .Fa command_name
 .Fa command_function
 .Fc
+.Fo DB_COMMAND_FLAG
+.Fa command_name
+.Fa command_function
+.Fa flag
+.Fc
 .Fn DB_SHOW_COMMAND "command_name" "command_function"
 .Sh DESCRIPTION
 The
@@ -51,6 +57,13 @@ from ddb will call
 .Fa command_function .
 .Pp
 The
+.Fn DB_COMMAND_FLAG
+macro is a variant of
+.Fn DB_COMMAND
+which allows for specifying an additional
+.Fa flag .
+.Pp
+The
 .Fn DB_SHOW_COMMAND
 is roughly equivalent to
 .Fn DB_COMMAND
index bf94239..e346352 100644 (file)
@@ -419,7 +419,8 @@ MLINKS+=crypto.9 crypto_dispatch.9 \
        crypto.9 crypto_unblock.9 \
        crypto.9 crypto_unregister.9 \
        crypto.9 crypto_unregister_all.9
-MLINKS+=DB_COMMAND.9 DB_SHOW_COMMAND.9
+MLINKS+=DB_COMMAND.9 DB_COMMAND_FLAG.9 \
+       DB_COMMAND.9 DB_SHOW_COMMAND.9
 MLINKS+=devclass_add_driver.9 devclass_delete_driver.9 \
        devclass_add_driver.9 devclass_find_driver.9
 MLINKS+=device_add_child.9 device_add_child_ordered.9
index 4a725f9..f79ac2b 100644 (file)
 typedef void db_cmdfcn_t (db_expr_t addr, boolean_t have_addr,
                              db_expr_t count, char *modif);
 
+#define DB_COMMAND_FLAG(cmd_name, func_name, flag) \
+       DB_SET(cmd_name, func_name, db_cmd_set, flag, NULL)
 #define DB_COMMAND(cmd_name, func_name) \
-       DB_SET(cmd_name, func_name, db_cmd_set, 0, NULL)
+       DB_COMMAND_FLAG(cmd_name, func_name, 0)
 #define DB_SHOW_COMMAND(cmd_name, func_name) \
        DB_SET(cmd_name, func_name, db_show_cmd_set, 0, NULL)
 
index 430f48e..c0c918b 100644 (file)
@@ -32,7 +32,6 @@
  * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.c#35 $
  *
  * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.c,v 1.23 2005/12/04 02:12:40 ru Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_osm.c,v 1.27 2008/05/18 20:30:21 pavalos Exp $
  */
 
 #include "aic79xx_osm.h"
@@ -1415,7 +1414,7 @@ DB_COMMAND(ahd_in, ahd_ddb_in)
        }
 }
 
-DB_SET(ahd_out, ahd_ddb_out, db_cmd_set, CS_MORE, NULL)
+DB_COMMAND_FLAG(ahd_out, ahd_ddb_out, CS_MORE)
 {
        db_expr_t old_value;
        db_expr_t new_value;