-
Notifications
You must be signed in to change notification settings - Fork 0
/
disk_image.h
59 lines (32 loc) · 1.54 KB
/
disk_image.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
#ifndef _DISKIMAGE_H
#define _DISKIMAGE_H
#include <sys/stat.h>
#include <fuse.h>
#include <string.h>
#include "inode.h"
void disk_mount_the_filesystem(const char *disk_iso_path);
void *init_disk_image(const char *disk_iso_path);
void remount_disk_image(const char *disk_iso_path);
void init_filesystem(const char *disk_iso_path);
void unmap_filesystem(void *disk_iso_base);
int disk_access(const char *entry_path);
int disk_check_permissions(const char *entry_path, int mask);
int disk_get_attributes_from_path(const char *path, struct stat *stbuf);
int disk_get_attributes_from_inode(int inode_number, struct stat *stbuf);
int disk_mknod(const char *path, mode_t mode);
int disk_chmod(const char *path, mode_t mode);
int disk_rename(const char *form, const char *to);
int disk_truncate(const char *path, off_t size);
int disk_link(const char *from, const char *to);
int disk_mkdir(const char *path, mode_t mode);
int disk_change_utimens(const char *path, const struct timespec times[2]);
int disk_readdir(const char *path, void *buf, fuse_fill_dir_t filler);
int write_data_in_file(inode *file, const char *buf, size_t size, off_t offset);
int disk_write(const char *path, const char *buf, size_t size, off_t offset);
int read_data_from_file(inode *file, char *buf, size_t size, off_t offset);
int disk_read(const char *path, char *buf, size_t size, off_t offset);
int disk_unlink(const char *path);
int disk_rmdir(const char *path);
int disk_symlink(const char *from, const char *to);
int disk_readlink(const char *path, char *buf, size_t size);
#endif