File: headers.h

package info (click to toggle)
rdiff-backup-fs 1.0.0-8
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 952 kB
  • sloc: sh: 3,800; ansic: 2,944; makefile: 23
file content (59 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (4)
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
#ifndef _HEADERS_H_
#define _HEADERS_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include <zlib.h>
#include <stdarg.h>

#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>

#define pass(val) printf("Passed point %d\n", val);
#define single(type) calloc(1, sizeof(type))

#define DEBUG

#define PROGRAM_NAME "rdiff-backup-fs"
#define TMP_DIR_NAME PROGRAM_NAME "-XXXXXX"

#define MIRROR_PREFIX "mirror_metadata."
// strlen("mirror_metadata.XXXX-XX-XXTXX:XX:XX");
#define GMT_TYPE_POSITION 35

#define DIR_SIZE 4096

#define STRUCTURE_FULL 1
#define STRUCTURE_NECESSARY 2

#define LAYOUT_ALL 1
#define LAYOUT_LAST 2

/* type of policy used in caching files */
#define POLICY_SIMPLE 1
#define POLICY_LIMIT 2

#define ARCHFS_DIR_FORMAT "%4d-%02d-%02dT%02d:%02d:%02d"
#define ARCHFS_DIR_FORMAT_LENGTH "XXXX-XX-XXTXX:XX:XX"

#define lock(mutex) pthread_mutex_lock(&mutex)
#define unlock(mutex) pthread_mutex_unlock(&mutex)

struct file_system_info {
	int repo_count;
	int *rev_count;
    
    char **repos;
    char **repo_names;
    
    // TODO: this must be fixed; it doesn't hold actual information about revs,
    // but only the most recent revs for multiple repos
    char **revs;
};

#endif