File: database.h

package info (click to toggle)
reprozip 1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: ansic: 2,848; python: 2,734; sh: 20; makefile: 12
file content (24 lines) | stat: -rw-r--r-- 984 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef DATABASE_H
#define DATABASE_H

#define FILE_READ   0x01
#define FILE_WRITE  0x02
#define FILE_WDIR   0x04  /* File is used as a process's working dir */
#define FILE_STAT   0x08  /* File is stat()d (only metadata is read) */
#define FILE_LINK   0x10  /* The link itself is accessed, no dereference */
#define FILE_SOCKET 0x20  /* The file is a UNIX domain socket */

int db_init(const char *filename);
int db_close(int rollback);
int db_add_process(unsigned int *id, unsigned int parent_id,
                   const char *working_dir, int is_thread);
int db_add_exit(unsigned int id, int exitcode);
int db_add_first_process(unsigned int *id, const char *working_dir);
int db_add_file_open(unsigned int process,
                     const char *name, unsigned int mode,
                     int is_dir);
int db_add_exec(unsigned int process, const char *binary,
                const char *const *argv, const char *const *envp,
                const char *workingdir);

#endif