Print this page
NEX-2911 NDMP logging should use syslog and is too chatty
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/ndmpd/tlm/tlm_proto.h
+++ new/usr/src/cmd/ndmpd/tlm/tlm_proto.h
1 1 /*
2 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 3 */
4 4
5 5 /*
6 6 * BSD 3 Clause License
7 7 *
8 8 * Copyright (c) 2007, The Storage Networking Industry Association.
9 9 *
10 10 * Redistribution and use in source and binary forms, with or without
11 11 * modification, are permitted provided that the following conditions
12 12 * are met:
13 13 * - Redistributions of source code must retain the above copyright
14 14 * notice, this list of conditions and the following disclaimer.
15 15 *
16 16 * - Redistributions in binary form must reproduce the above copyright
17 17 * notice, this list of conditions and the following disclaimer in
18 18 * the documentation and/or other materials provided with the
19 19 * distribution.
20 20 *
21 21 * - Neither the name of The Storage Networking Industry Association (SNIA)
22 22 * nor the names of its contributors may be used to endorse or promote
23 23 * products derived from this software without specific prior written
24 24 * permission.
25 25 *
26 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 29 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30 30 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
↓ open down ↓ |
34 lines elided |
↑ open up ↑ |
35 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 36 * POSSIBILITY OF SUCH DAMAGE.
37 37 */
38 38 #ifndef _TLM_PROTO_H
39 39 #define _TLM_PROTO_H
40 40
41 41 #include <tlm.h>
42 42 #include <tlm_buffers.h>
43 43 #include <ndmpd_door.h>
44 44 #include <dirent.h>
45 -#include <syslog.h>
46 45 #include <pthread.h>
47 46
48 47 #define SCSI_CHANGER_DIR "/dev/scsi/changer"
49 48 #define SCSI_TAPE_DIR "/dev/rmt"
50 49
51 50 #define MAXIORETRY 20
52 51
53 52 typedef void log_func_t(ulong_t, char *, ...);
54 53 typedef void * (*funct_t)(void *); /* function pointer */
55 54
56 55 extern longlong_t llmin(longlong_t, longlong_t);
57 56 extern unsigned int min(unsigned int, unsigned int);
58 57 extern unsigned int max(unsigned int, unsigned int);
59 58 extern int oct_atoi(char *p);
60 59
61 60 extern int tlm_log_fhnode(tlm_job_stats_t *,
62 61 char *,
63 62 char *,
64 63 struct stat64 *,
65 64 u_longlong_t);
66 65
67 66 extern int tlm_log_fhdir(tlm_job_stats_t *,
68 67 char *,
69 68 struct stat64 *,
70 69 struct fs_fhandle *);
71 70
72 71 extern int tlm_log_fhpath_name(tlm_job_stats_t *,
73 72 char *,
74 73 struct stat64 *,
75 74 u_longlong_t);
76 75
77 76 extern boolean_t tlm_is_too_long(int,
78 77 char *,
79 78 char *);
80 79
81 80 extern void tlm_log_list(char *,
82 81 char **);
83 82 extern tlm_drive_t *tlm_drive(int, int);
84 83 extern tlm_library_t *tlm_library(int);
85 84 extern tlm_slot_t *tlm_slot(int, int);
86 85
87 86 extern sasd_drive_t *sasd_slink_drive(scsi_link_t *);
88 87 extern scsi_link_t *sasd_dev_slink(int);
89 88 extern sasd_drive_t *sasd_drive(int);
90 89 extern scsi_adapter_t *scsi_get_adapter(int);
91 90 extern int scsi_get_adapter_count(void);
92 91
93 92 extern char *sasd_slink_name(scsi_link_t *);
94 93 extern int sasd_dev_count(void);
95 94 extern int tlm_ioctl(int, int, void *);
96 95 extern int probe_scsi();
97 96
98 97 extern void tlm_enable_barcode(int);
99 98 extern int tlm_insert_new_library(scsi_link_t *);
100 99 extern int tlm_insert_new_drive(int);
101 100 extern int tlm_insert_new_slot(int);
102 101
103 102 extern char *tlm_get_tape_name(int, int);
104 103 extern int tlm_library_count(void);
105 104
106 105 extern boolean_t fs_is_rdonly(char *);
107 106 extern boolean_t fs_is_chkpntvol();
108 107 extern int get_zfsvolname(char *, int, char *);
109 108 extern int chkpnt_creationtime_bypattern();
110 109
111 110 extern log_func_t log_debug;
112 111 extern log_func_t log_error;
113 112 extern boolean_t match(char *, char *);
114 113
115 114 extern void tlm_build_header_checksum(tlm_tar_hdr_t *);
116 115 extern int tlm_vfy_tar_checksum(tlm_tar_hdr_t *);
117 116 extern int tlm_entry_restored(tlm_job_stats_t *, char *, int);
118 117 extern char *strupr(char *);
119 118 extern char *parse(char **, char *);
120 119 extern int sysattr_rdonly(char *);
121 120 extern int sysattr_rw(char *);
122 121
123 122 extern int tar_putfile(char *,
124 123 char *,
125 124 char *,
126 125 tlm_acls_t *,
127 126 tlm_commands_t *,
128 127 tlm_cmd_t *,
129 128 tlm_job_stats_t *,
130 129 struct hardlink_q *);
131 130
132 131 extern int tar_putdir(char *,
133 132 tlm_acls_t *,
134 133 tlm_cmd_t *,
135 134 tlm_job_stats_t *);
136 135
137 136 extern int tar_getfile(tlm_backup_restore_arg_t *);
138 137
139 138 extern int
140 139 tar_getdir(tlm_commands_t *,
141 140 tlm_cmd_t *,
142 141 tlm_job_stats_t *,
143 142 struct rs_name_maker *,
144 143 int,
145 144 int,
146 145 char **,
147 146 char **,
148 147 int,
149 148 int,
150 149 char *,
151 150 struct hardlink_q *);
152 151 #endif /* _TLM_PROTO_H */
|
↓ open down ↓ |
97 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX