diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-30 13:08:04 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-30 13:08:04 +0000 |
| commit | ba3bcbb86ea0177349bcd021559347248d6ab10a (patch) | |
| tree | 23d8be4d59a1639ebea301fb2caf39b8b1ed0e27 /src/libs6rc/s6rc_read_uint.c | |
| parent | 79cb9644f99f056641f4c145da6e7ca63b333b80 (diff) | |
| download | s6-rc-ba3bcbb86ea0177349bcd021559347248d6ab10a.tar.gz | |
Stash temporary changes. Does not build; is not intended to.
Diffstat (limited to 'src/libs6rc/s6rc_read_uint.c')
| -rw-r--r-- | src/libs6rc/s6rc_read_uint.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/libs6rc/s6rc_read_uint.c b/src/libs6rc/s6rc_read_uint.c deleted file mode 100644 index 1f148ac..0000000 --- a/src/libs6rc/s6rc_read_uint.c +++ /dev/null @@ -1,18 +0,0 @@ -/* ISC license. */ - -#include <sys/types.h> -#include <errno.h> -#include <skalibs/types.h> -#include <skalibs/bytestr.h> -#include <skalibs/djbunix.h> -#include <s6-rc/s6rc-utils.h> - -int s6rc_read_uint (char const *file, unsigned int *u) -{ - char buf[UINT_FMT + 1] ; - ssize_t r = openreadnclose(file, buf, UINT_FMT) ; - if (r < 0) return (errno == ENOENT) ? 0 : -1 ; - buf[byte_chr(buf, r, '\n')] = 0 ; - if (!uint0_scan(buf, u)) return (errno = EINVAL, -1) ; - return 1 ; -} |
