File: support.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 (53 lines) | stat: -rw-r--r-- 980 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
#ifndef _RETRIEVER_SUPPORT_H_
#define _RETRIEVER_SUPPORT_H_

#include <pthread.h>
#include "../headers.h"
#include "../externs.h"
#include "../errors.h"
#include "../support/gstring.h"
#include "../support/gpath.h"
#include "../structure/core.h"

struct node;

typedef struct node node_t;

struct node {
    char *path;
    char *tmp_path;
    int count;
    int rev;
    
    node_t *next;
    node_t *prev;
};

struct list {
    node_t *head;
    node_t *tail;
};

typedef struct list list_t;

extern pthread_mutex_t **file_mutex;

extern list_t *open_files;

node_t * get_open_file(char *path);

void delete_open_file(node_t *node);

int retriever_init_common(struct file_system_info *);

int retrieve_common(struct file_system_info *fsinfo, struct stats *, int);

int repo_number(struct file_system_info *, char *);

int retrieve_rdiff(char *, char *, char *);

int create_tmp_file(struct stats *, node_t *node);

node_t * add_file(list_t *list, char *path, int rev);

#endif