Mercurial > hg > toybox
comparison lib/lib.h @ 883:aca8323e2690
Add posix headers to toynet.h, move xioctl() to lib.c, introduce lib/net.c and move xsocket() to it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 26 Apr 2013 02:41:05 -0500 |
parents | aa5bd0a358dd |
children | beb32d780164 |
comparison
equal
deleted
inserted
replaced
882:ae7a0fd5363f | 883:aca8323e2690 |
---|---|
117 void xwrite(int fd, void *buf, size_t len); | 117 void xwrite(int fd, void *buf, size_t len); |
118 off_t xlseek(int fd, off_t offset, int whence); | 118 off_t xlseek(int fd, off_t offset, int whence); |
119 off_t lskip(int fd, off_t offset); | 119 off_t lskip(int fd, off_t offset); |
120 char *readfile(char *name); | 120 char *readfile(char *name); |
121 char *xreadfile(char *name); | 121 char *xreadfile(char *name); |
122 void msleep(long miliseconds); | |
123 int xioctl(int fd, int request, void *data); | |
122 char *xgetcwd(void); | 124 char *xgetcwd(void); |
123 void xstat(char *path, struct stat *st); | 125 void xstat(char *path, struct stat *st); |
124 char *xabspath(char *path, int exact); | 126 char *xabspath(char *path, int exact); |
125 char *xrealpath(char *path); | 127 char *xrealpath(char *path); |
126 void xchdir(char *path); | 128 void xchdir(char *path); |
150 void terminal_size(unsigned *x, unsigned *y); | 152 void terminal_size(unsigned *x, unsigned *y); |
151 int yesno(char *prompt, int def); | 153 int yesno(char *prompt, int def); |
152 void for_each_pid_with_name_in(char **names, int (*callback)(pid_t pid, char *name)); | 154 void for_each_pid_with_name_in(char **names, int (*callback)(pid_t pid, char *name)); |
153 unsigned long xstrtoul(const char *nptr, char **endptr, int base); | 155 unsigned long xstrtoul(const char *nptr, char **endptr, int base); |
154 | 156 |
157 // net.c | |
158 int xsocket(int domain, int type, int protocol); | |
159 | |
155 // getmountlist.c | 160 // getmountlist.c |
156 struct mtab_list { | 161 struct mtab_list { |
157 struct mtab_list *next; | 162 struct mtab_list *next; |
158 struct stat stat; | 163 struct stat stat; |
159 struct statvfs statvfs; | 164 struct statvfs statvfs; |