/
stored.h
87 lines (76 loc) · 2.18 KB
/
stored.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2000-2013 Free Software Foundation Europe e.V.
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
License as published by the Free Software Foundation and included
in the file LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
/*
* Storage daemon specific defines and includes
*/
#ifndef __STORED_H_
#define __STORED_H_
#define STORAGE_DAEMON 1
/* Set to debug mutexes */
//#define SD_DEBUG_LOCK
#ifdef SD_DEBUG_LOCK
const int sd_dbglvl = 3;
#else
const int sd_dbglvl = 300;
#endif
#ifdef HAVE_MTIO_H
#include <mtio.h>
#else
#ifdef HAVE_SYS_MTIO_H
#ifdef HAVE_AIX_OS
#define _MTEXTEND_H 1
#endif
#include <sys/mtio.h>
#else
#ifdef HAVE_SYS_TAPE_H
#include <sys/tape.h>
#else
/* Needed for Mac 10.6 (Snow Leopard) */
#include "lib/bmtio.h"
#endif
#endif
#endif
#include "lib/bsr.h"
#include "lock.h"
#include "block.h"
#include "record.h"
#include "dev.h"
#include "stored_conf.h"
#include "jcr.h"
#include "vol_mgr.h"
#include "reserve.h"
#include "protos.h"
#ifdef HAVE_FNMATCH
#include <fnmatch.h>
#else
#include "lib/fnmatch.h"
#endif
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#define NAMELEN(dirent) (strlen((dirent)->d_name))
#endif
#ifndef HAVE_READDIR_R
int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
#endif
#include "vtape.h"
#include "sd_plugins.h"
/* Daemon globals from stored.c */
extern STORES *me; /* "Global" daemon resource */
extern bool forge_on; /* proceed inspite of I/O errors */
extern pthread_mutex_t device_release_mutex;
extern pthread_cond_t wait_device_release; /* wait for any device to be released */
#endif /* __STORED_H_ */