xref: /titanic_52/usr/src/lib/smbsrv/libfksmbsrv/common/fksmb_dt.c (revision 263f549e5da8b32c4922f586afb365b8ae388a6c)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
14  */
15 
16 #include <smbsrv/smb_kproto.h>
17 
18 /*
19  * See: DTRACE_PROBE... in smb_kproto.h
20  */
21 
22 int fksmbd_dtrace_log = 0;
23 
24 void
25 smb_dtrace1(const char *f, const char *n,
26 	    const char *t1, long v1)
27 {
28 	if (fksmbd_dtrace_log) {
29 		cmn_err(CE_CONT, "dtrace1:%s:%s,"
30 		    " (%s) 0x%lx\n",
31 		    f, n, t1, v1);
32 	}
33 }
34 
35 void
36 smb_dtrace2(const char *f, const char *n,
37 	    const char *t1, long v1,
38 	    const char *t2, long v2)
39 {
40 	if (fksmbd_dtrace_log) {
41 		cmn_err(CE_CONT, "dtrace2:%s:%s,"
42 		    " (%s) 0x%lx, (%s) 0x%lx\n",
43 		    f, n, t1, v1, t2, v2);
44 	}
45 }
46 
47 void
48 smb_dtrace3(const char *f, const char *n,
49 	    const char *t1, long v1,
50 	    const char *t2, long v2,
51 	    const char *t3, long v3)
52 {
53 	if (fksmbd_dtrace_log) {
54 		cmn_err(CE_CONT, "dtrace3:%s:%s,"
55 		    " (%s) 0x%lx, (%s) 0x%lx, (%s) 0x%lx\n",
56 		    f, n, t1, v1, t2, v2, t3, v3);
57 	}
58 }
59