File: nfsd_path.h

package info (click to toggle)
nfs-utils 1%3A2.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,276 kB
  • sloc: ansic: 52,182; sh: 5,371; python: 2,151; makefile: 971
file content (33 lines) | stat: -rw-r--r-- 911 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
25
26
27
28
29
30
31
32
33
/*
 * Copyright (C) 2019 Trond Myklebust <trond.myklebust@hammerspace.com>
 */
#ifndef NFSD_PATH_H
#define NFSD_PATH_H

#include <sys/stat.h>

struct file_handle;
struct statfs;
struct nfsd_task_t;

void 		nfsd_path_init(void);

const char *	nfsd_path_nfsd_rootdir(void);
char *		nfsd_path_strip_root(char *pathname);
char *		nfsd_path_prepend_dir(const char *dir, const char *pathname);

int 		nfsd_path_stat(const char *pathname, struct stat *statbuf);
int 		nfsd_path_lstat(const char *pathname, struct stat *statbuf);

int		nfsd_path_statfs(const char *pathname,
				   struct statfs *statbuf);

char *		nfsd_realpath(const char *path, char *resolved_path);

ssize_t		nfsd_path_read(int fd, void* buf, size_t len);
ssize_t		nfsd_path_write(int fd, void* buf, size_t len);

int		nfsd_name_to_handle_at(int fd, const char *path,
				       struct file_handle *fh,
				       int *mount_id, int flags);
#endif