add debug pretty-printing for OPEN_* flags as well
This commit is contained in:
		
							parent
							
								
									17db5de0ca
								
							
						
					
					
						commit
						3091e2fe5a
					
				
					 2 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
					@ -8,6 +8,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "driver.h"
 | 
					#include "driver.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BIT_FORMATTER_FUNCTION(opts, OPEN)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct gen_cmd gen_cmd_t;
 | 
					typedef struct gen_cmd gen_cmd_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef union proxy_store {
 | 
					typedef union proxy_store {
 | 
				
			||||||
| 
						 | 
					@ -162,7 +164,7 @@ static @type@proxy_@name@( store_t *gctx@decl_args@ )
 | 
				
			||||||
	debug( "%sEnter @name@@print_fmt_args@\n", ctx->label@print_pass_args@ );
 | 
						debug( "%sEnter @name@@print_fmt_args@\n", ctx->label@print_pass_args@ );
 | 
				
			||||||
	@print_args@
 | 
						@print_args@
 | 
				
			||||||
	@type@rv = ctx->real_driver->@name@( ctx->real_store@pass_args@ );
 | 
						@type@rv = ctx->real_driver->@name@( ctx->real_store@pass_args@ );
 | 
				
			||||||
	debug( "%sLeave @name@, ret=@fmt@\n", ctx->label, rv );
 | 
						debug( "%sLeave @name@, ret=@print_fmt_ret@\n", ctx->label, @print_pass_ret@ );
 | 
				
			||||||
	return rv;
 | 
						return rv;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
//# END
 | 
					//# END
 | 
				
			||||||
| 
						 | 
					@ -239,6 +241,11 @@ static @type@proxy_@name@( store_t *gctx@decl_args@, void (*cb)( @decl_cb_args@v
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
//# END
 | 
					//# END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//# DEFINE prepare_load_box_print_fmt_args , opts=%s
 | 
				
			||||||
 | 
					//# DEFINE prepare_load_box_print_pass_args , fmt_opts( opts ).str
 | 
				
			||||||
 | 
					//# DEFINE prepare_load_box_print_fmt_ret %s
 | 
				
			||||||
 | 
					//# DEFINE prepare_load_box_print_pass_ret fmt_opts( rv ).str
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//# DEFINE load_box_pre_print_args
 | 
					//# DEFINE load_box_pre_print_args
 | 
				
			||||||
	char ubuf[12];
 | 
						char ubuf[12];
 | 
				
			||||||
//# END
 | 
					//# END
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -161,7 +161,8 @@ for (@ptypes) {
 | 
				
			||||||
			$template = "REGULAR_VOID";
 | 
								$template = "REGULAR_VOID";
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			$template = "REGULAR";
 | 
								$template = "REGULAR";
 | 
				
			||||||
			$replace{'fmt'} = type_to_format($cmd_type);
 | 
								$replace{'print_fmt_ret'} = type_to_format($cmd_type);
 | 
				
			||||||
 | 
								$replace{'print_pass_ret'} = "rv";
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		$replace{'decl_args'} = $cmd_args;
 | 
							$replace{'decl_args'} = $cmd_args;
 | 
				
			||||||
		$replace{'print_pass_args'} = $replace{'pass_args'} = make_args($cmd_args);
 | 
							$replace{'print_pass_args'} = $replace{'pass_args'} = make_args($cmd_args);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue