diff options
Diffstat (limited to 'util/libreboot-utils/include/common.h')
| -rw-r--r-- | util/libreboot-utils/include/common.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h index abd153be..da102f05 100644 --- a/util/libreboot-utils/include/common.h +++ b/util/libreboot-utils/include/common.h @@ -301,8 +301,6 @@ struct xstate { struct macaddr mac; struct xfile f; - char *argv0; - size_t i; /* index to cmd[] for current command */ int no_cmd; @@ -380,6 +378,7 @@ char *smalloc(char **buf, size_t size); void *vmalloc(void **buf, size_t size); int slen(const char *scmp, size_t maxlen, size_t *rval); +int vcmp(const void *s1, const void *s2, size_t n); int scmp(const char *a, const char *b, size_t maxlen, int *rval); int sdup(const char *s, @@ -396,10 +395,10 @@ int dcat(const char *s, size_t n, unsigned short hextonum(char ch_s); void spew_hex(const void *data, size_t len); -void *mkrbuf(size_t n); +void *rmalloc(size_t n); void rset(void *buf, size_t n); -void *mkrbuf(size_t n); -char *mkrstr(size_t n); +void *rmalloc(size_t n); +char *rchars(size_t n); size_t rsize(size_t n); /* Helper functions for command: dump @@ -484,6 +483,14 @@ ssize_t rw_over_nrw(ssize_t r, size_t nrw); off_t lseek_on_eintr(int fd, off_t off, int whence, int loop_eagain, int loop_eintr); int try_err(int loop_err, int errval); +ssize_t read_on_eintr(int fd, + void *buf, size_t count); +ssize_t write_on_eintr(int fd, + void *buf, size_t count); +ssize_t pread_on_eintr(int fd, + void *buf, size_t count, off_t off); +ssize_t pwrite_on_eintr(int fd, + void *buf, size_t count, off_t off); /* Error handling and cleanup */ @@ -524,7 +531,6 @@ mkhtemp_tmpfile_linux(int dirfd, int mkhtemp(int *fd, struct stat *st, char *template, int dirfd, const char *fname, struct stat *st_dir_initial, int type); -int mkhtemp_fill_random(char *p, size_t xc); int world_writeable_and_sticky(const char *s, int sticky_allowed, int always_sticky); int same_dir(const char *a, const char *b); |
