SFUSE_Documentation
로딩중...
검색중...
일치하는것 없음
ops.c 파일 참조
#include "fs.h"
#include <dirent.h>
#include <errno.h>
#include <fuse3/fuse.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
ops.c에 대한 include 의존 그래프

이 파일의 소스 코드 페이지로 가기

함수

static int sfuse_getattr_cb (const char *path, struct stat *stbuf, struct fuse_file_info *fi)
 파일/디렉터리 속성 조회 콜백
static int sfuse_access_cb (const char *path, int mask)
 access 콜백
static int sfuse_readdir_cb (const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags flags)
 디렉터리 목록 조회 콜백
static int sfuse_open_cb (const char *path, struct fuse_file_info *fi)
 파일 열기 콜백
static int sfuse_read_cb (const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
 파일 읽기 콜백
static int sfuse_write_cb (const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
 파일 쓰기 콜백
static int sfuse_create_cb (const char *path, mode_t mode, struct fuse_file_info *fi)
 파일 생성 콜백
static int sfuse_mkdir_cb (const char *path, mode_t mode)
 디렉터리 생성 콜백
static int sfuse_unlink_cb (const char *path)
 파일 삭제 콜백
static int sfuse_rmdir_cb (const char *path)
 디렉터리 삭제 콜백
static int sfuse_rename_cb (const char *from, const char *to, unsigned int flags)
 이름 변경 콜백
static int sfuse_truncate_cb (const char *path, off_t size, struct fuse_file_info *fi)
 파일 크기 변경 콜백
static int sfuse_utimens_cb (const char *path, const struct timespec tv[2], struct fuse_file_info *fi)
 파일/디렉터리 타임스탬프 갱신 콜백
static int sfuse_flush_cb (const char *path, struct fuse_file_info *fi)
 flush 콜백
static int sfuse_fsync_cb (const char *path, int datasync, struct fuse_file_info *fi)
 fsync 콜백
struct fuse_operations * sfuse_get_operations (void)
 FUSE operations 테이블 반환

함수 문서화

◆ sfuse_access_cb()

int sfuse_access_cb ( const char * path,
int mask )
static

access 콜백

매개변수
path검사할 경로 문자열
mask접근 마스크 (R_OK, W_OK, X_OK)
반환값
fs_access 반환값

ops.c 파일의 35 번째 라인에서 정의되었습니다.

35 {
36 struct sfuse_fs *fs = fuse_get_context()->private_data;
37 return fs_access(fs, path, mask);
38}
int fs_access(struct sfuse_fs *fs, const char *path, int mask)
접근 권한 검사
Definition fs.c:1343
SFUSE 파일 시스템 컨텍스트 구조체
Definition fs.h:21
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_create_cb()

int sfuse_create_cb ( const char * path,
mode_t mode,
struct fuse_file_info * fi )
static

파일 생성 콜백

매개변수
path생성할 파일 경로 문자열
mode생성할 파일 모드
fiFUSE 파일 정보 구조체
반환값
fs_create 반환값

ops.c 파일의 112 번째 라인에서 정의되었습니다.

113 {
114 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
115 return fs_create(fs, path, mode, fi);
116}
int fs_create(struct sfuse_fs *fs, const char *path, mode_t mode, struct fuse_file_info *fi)
파일 생성
Definition fs.c:570
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_flush_cb()

int sfuse_flush_cb ( const char * path,
struct fuse_file_info * fi )
static

flush 콜백

매개변수
path대상 경로 문자열 (사용되지 않음)
fiFUSE 파일 정보 구조체
반환값
fs_flush 반환값

ops.c 파일의 204 번째 라인에서 정의되었습니다.

204 {
205 (void)path;
206 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
207 return fs_flush(fs, path, fi);
208}
int fs_flush(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi)
FUSE에서 플러시 요청 처리
Definition fs.c:1302
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_fsync_cb()

int sfuse_fsync_cb ( const char * path,
int datasync,
struct fuse_file_info * fi )
static

fsync 콜백

매개변수
path대상 경로 문자열 (사용되지 않음)
datasync데이터만 동기화할지 여부
fiFUSE 파일 정보 구조체
반환값
fs_fsync 반환값

ops.c 파일의 218 번째 라인에서 정의되었습니다.

219 {
220 (void)path;
221 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
222 return fs_fsync(fs, path, datasync, fi);
223}
int fs_fsync(struct sfuse_fs *fs, const char *path, int datasync, struct fuse_file_info *fi)
FUSE에서 fsync 요청 처리
Definition fs.c:1280
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_get_operations()

struct fuse_operations * sfuse_get_operations ( void )

FUSE operations 테이블 반환

SFUSE FUSE 연산 테이블을 반환

SFUSE용 FUSE operations 구조체 반환

생성된 콜백 함수들을 ops 구조체에 등록하여 반환한다.

반환값
설정된 fuse_operations 구조체 포인터

ops.c 파일의 232 번째 라인에서 정의되었습니다.

232 {
233 static struct fuse_operations ops;
234 memset(&ops, 0, sizeof(ops));
235 ops.getattr = sfuse_getattr_cb;
236 ops.access = sfuse_access_cb;
237 ops.readdir = sfuse_readdir_cb;
238 ops.open = sfuse_open_cb;
239 ops.read = sfuse_read_cb;
240 ops.write = sfuse_write_cb;
241 ops.create = sfuse_create_cb;
242 ops.mkdir = sfuse_mkdir_cb;
243 ops.unlink = sfuse_unlink_cb;
244 ops.rmdir = sfuse_rmdir_cb;
245 ops.rename = sfuse_rename_cb;
246 ops.truncate = sfuse_truncate_cb;
247 ops.flush = sfuse_flush_cb;
248 ops.fsync = sfuse_fsync_cb;
249 ops.utimens = sfuse_utimens_cb;
250 return &ops;
251}
static int sfuse_truncate_cb(const char *path, off_t size, struct fuse_file_info *fi)
파일 크기 변경 콜백
Definition ops.c:175
static int sfuse_fsync_cb(const char *path, int datasync, struct fuse_file_info *fi)
fsync 콜백
Definition ops.c:218
static int sfuse_read_cb(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
파일 읽기 콜백
Definition ops.c:82
static int sfuse_open_cb(const char *path, struct fuse_file_info *fi)
파일 열기 콜백
Definition ops.c:67
static int sfuse_rename_cb(const char *from, const char *to, unsigned int flags)
이름 변경 콜백
Definition ops.c:160
static int sfuse_getattr_cb(const char *path, struct stat *stbuf, struct fuse_file_info *fi)
파일/디렉터리 속성 조회 콜백
Definition ops.c:21
static int sfuse_create_cb(const char *path, mode_t mode, struct fuse_file_info *fi)
파일 생성 콜백
Definition ops.c:112
static int sfuse_utimens_cb(const char *path, const struct timespec tv[2], struct fuse_file_info *fi)
파일/디렉터리 타임스탬프 갱신 콜백
Definition ops.c:190
static int sfuse_unlink_cb(const char *path)
파일 삭제 콜백
Definition ops.c:136
static int sfuse_write_cb(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
파일 쓰기 콜백
Definition ops.c:98
static int sfuse_mkdir_cb(const char *path, mode_t mode)
디렉터리 생성 콜백
Definition ops.c:125
static int sfuse_readdir_cb(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags flags)
디렉터리 목록 조회 콜백
Definition ops.c:51
static int sfuse_access_cb(const char *path, int mask)
access 콜백
Definition ops.c:35
static int sfuse_rmdir_cb(const char *path)
디렉터리 삭제 콜백
Definition ops.c:147
static int sfuse_flush_cb(const char *path, struct fuse_file_info *fi)
flush 콜백
Definition ops.c:204
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_getattr_cb()

int sfuse_getattr_cb ( const char * path,
struct stat * stbuf,
struct fuse_file_info * fi )
static

파일/디렉터리 속성 조회 콜백

매개변수
path조회할 경로 문자열
stbuf결과를 저장할 stat 구조체 포인터
fiFUSE 파일 정보 구조체 (사용되지 않음)
반환값
fs_getattr 반환값

ops.c 파일의 21 번째 라인에서 정의되었습니다.

22 {
23 (void)fi;
24 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
25 return fs_getattr(fs, path, stbuf);
26}
int fs_getattr(struct sfuse_fs *fs, const char *path, struct stat *stbuf)
파일/디렉터리 속성 조회
Definition fs.c:237
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_mkdir_cb()

int sfuse_mkdir_cb ( const char * path,
mode_t mode )
static

디렉터리 생성 콜백

매개변수
path생성할 디렉터리 경로 문자열
mode생성할 디렉터리 모드
반환값
fs_mkdir 반환값

ops.c 파일의 125 번째 라인에서 정의되었습니다.

125 {
126 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
127 return fs_mkdir(fs, path, mode);
128}
int fs_mkdir(struct sfuse_fs *fs, const char *path, mode_t mode)
디렉터리 생성
Definition fs.c:702
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_open_cb()

int sfuse_open_cb ( const char * path,
struct fuse_file_info * fi )
static

파일 열기 콜백

매개변수
path열 경로 문자열
fiFUSE 파일 정보 구조체
반환값
fs_open 반환값

ops.c 파일의 67 번째 라인에서 정의되었습니다.

67 {
68 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
69 return fs_open(fs, path, fi);
70}
int fs_open(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi)
파일 열기
Definition fs.c:290
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_read_cb()

int sfuse_read_cb ( const char * path,
char * buf,
size_t size,
off_t offset,
struct fuse_file_info * fi )
static

파일 읽기 콜백

매개변수
path읽을 파일 경로 문자열
buf데이터를 저장할 버퍼 포인터
size요청할 바이트 수
offset파일 내 읽기 시작 오프셋
fiFUSE 파일 정보 구조체 (사용되지 않음)
반환값
fs_read 반환값

ops.c 파일의 82 번째 라인에서 정의되었습니다.

83 {
84 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
85 return fs_read(fs, path, buf, size, offset);
86}
int fs_read(struct sfuse_fs *fs, const char *path, char *buf, size_t size, off_t offset)
파일 읽기
Definition fs.c:310
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_readdir_cb()

int sfuse_readdir_cb ( const char * path,
void * buf,
fuse_fill_dir_t filler,
off_t offset,
struct fuse_file_info * fi,
enum fuse_readdir_flags flags )
static

디렉터리 목록 조회 콜백

매개변수
path디렉터리 경로 문자열
bufFUSE가 제공하는 버퍼 포인터
filler디렉터리 엔트리 추가 콜백
offset읽기 시작 오프셋
fiFUSE 파일 정보 구조체 (사용되지 않음)
flagsreaddir 플래그 (사용되지 않음)
반환값
fs_readdir 반환값

ops.c 파일의 51 번째 라인에서 정의되었습니다.

53 {
54 (void)fi;
55 (void)flags;
56 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
57 return fs_readdir(fs, path, buf, filler, offset);
58}
int fs_readdir(struct sfuse_fs *fs, const char *path, void *buf, fuse_fill_dir_t filler, off_t offset)
디렉터리 내용 읽기
Definition fs.c:272
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_rename_cb()

int sfuse_rename_cb ( const char * from,
const char * to,
unsigned int flags )
static

이름 변경 콜백

매개변수
from원본 경로 문자열
to대상 경로 문자열
flags리네임 플래그 (사용되지 않음)
반환값
fs_rename 반환값

ops.c 파일의 160 번째 라인에서 정의되었습니다.

161 {
162 (void)flags;
163 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
164 return fs_rename(fs, from, to);
165}
int fs_rename(struct sfuse_fs *fs, const char *from, const char *to)
파일 또는 디렉터리 이름 변경
Definition fs.c:1011
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_rmdir_cb()

int sfuse_rmdir_cb ( const char * path)
static

디렉터리 삭제 콜백

매개변수
path삭제할 디렉터리 경로 문자열
반환값
fs_rmdir 반환값

ops.c 파일의 147 번째 라인에서 정의되었습니다.

147 {
148 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
149 return fs_rmdir(fs, path);
150}
int fs_rmdir(struct sfuse_fs *fs, const char *path)
디렉터리 삭제
Definition fs.c:963
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_truncate_cb()

int sfuse_truncate_cb ( const char * path,
off_t size,
struct fuse_file_info * fi )
static

파일 크기 변경 콜백

매개변수
path대상 파일 경로 문자열
size새 크기 (바이트 단위)
fiFUSE 파일 정보 구조체 (사용되지 않음)
반환값
fs_truncate 반환값

ops.c 파일의 175 번째 라인에서 정의되었습니다.

176 {
177 (void)fi;
178 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
179 return fs_truncate(fs, path, size);
180}
int fs_truncate(struct sfuse_fs *fs, const char *path, off_t size)
파일 크기 조정 (truncate)
Definition fs.c:1138
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_unlink_cb()

int sfuse_unlink_cb ( const char * path)
static

파일 삭제 콜백

매개변수
path삭제할 파일 경로 문자열
반환값
fs_unlink 반환값

ops.c 파일의 136 번째 라인에서 정의되었습니다.

136 {
137 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
138 return fs_unlink(fs, path);
139}
int fs_unlink(struct sfuse_fs *fs, const char *path)
파일 삭제
Definition fs.c:829
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_utimens_cb()

int sfuse_utimens_cb ( const char * path,
const struct timespec tv[2],
struct fuse_file_info * fi )
static

파일/디렉터리 타임스탬프 갱신 콜백

매개변수
path대상 경로 문자열
tvtv[0]=접근 시간, tv[1]=수정 시간
fiFUSE 파일 정보 구조체 (사용되지 않음)
반환값
fs_utimens 반환값

ops.c 파일의 190 번째 라인에서 정의되었습니다.

191 {
192 (void)fi;
193 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
194 return fs_utimens(fs, path, tv);
195}
int fs_utimens(struct sfuse_fs *fs, const char *path, const struct timespec tv[2])
파일의 시간 속성 변경 (utimens)
Definition fs.c:1318
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ sfuse_write_cb()

int sfuse_write_cb ( const char * path,
const char * buf,
size_t size,
off_t offset,
struct fuse_file_info * fi )
static

파일 쓰기 콜백

매개변수
path쓸 파일 경로 문자열
buf기록할 데이터 버퍼 포인터
size기록할 바이트 수
offset파일 내 쓰기 시작 오프셋
fiFUSE 파일 정보 구조체 (사용되지 않음)
반환값
fs_write 반환값

ops.c 파일의 98 번째 라인에서 정의되었습니다.

99 {
100 struct sfuse_fs *fs = (struct sfuse_fs *)fuse_get_context()->private_data;
101 return fs_write(fs, path, buf, size, offset);
102}
int fs_write(struct sfuse_fs *fs, const char *path, const char *buf, size_t size, off_t offset)
파일 쓰기
Definition fs.c:407
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.: