summaryrefslogtreecommitdiff
path: root/include/unistd.h
blob: 06ce3558099fd8fb42a0198f93472ef3169b3b25 (plain)
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
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __UNISTD_H
#define __UNISTD_H

#include <linux/types.h>

struct stat;

int unlink(const char *pathname);
int close(int fd);
int lstat(const char *filename, struct stat *s);
int stat(const char *filename, struct stat *s);
int fstat(int fd, struct stat *s);
ssize_t read(int fd, void *buf, size_t count);
ssize_t pread(int fd, void *buf, size_t count, loff_t offset);
ssize_t write(int fd, const void *buf, size_t count);
ssize_t pwrite(int fd, const void *buf, size_t count, loff_t offset);
loff_t lseek(int fildes, loff_t offset, int whence);
int rmdir (const char *pathname);
int symlink(const char *pathname, const char *newpath);
int readlink(const char *path, char *buf, size_t bufsiz);
int chdir(const char *pathname);
const char *getcwd(void);
int ftruncate(int fd, loff_t length);

#endif /* __UNISTD_H */