diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-07-21 16:47:08 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-07-21 16:47:08 +0000 |
commit | fbd5d278b4ead5c3d7941bc7a4bbecc7bf684f61 (patch) | |
tree | 616522f8e0496c9b170f4467cdaffb426ffb84a3 /src/skaembutils/s6-update-symlinks.c | |
parent | 68990372b2a0eb3cdf998933dc0d01b76a0ebe85 (diff) | |
download | s6-portable-utils-fbd5d278b4ead5c3d7941bc7a4bbecc7bf684f61.tar.xz |
Adapt to skalibs-2.7.0.0
Diffstat (limited to 'src/skaembutils/s6-update-symlinks.c')
-rw-r--r-- | src/skaembutils/s6-update-symlinks.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/skaembutils/s6-update-symlinks.c b/src/skaembutils/s6-update-symlinks.c index 7ef3eb5..6acb77c 100644 --- a/src/skaembutils/s6-update-symlinks.c +++ b/src/skaembutils/s6-update-symlinks.c @@ -97,10 +97,8 @@ static int addlink (stralloc3 *blah, unsigned int dstpos, unsigned int srcpos) r = sareadlink(&blah->src, blah->dst.s + dstpos) ; if ((r == -1) && (errno != EINVAL)) { - int e = errno ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } if (r < 0) @@ -117,11 +115,9 @@ static int addlink (stralloc3 *blah, unsigned int dstpos, unsigned int srcpos) } if (errno) { - int e = errno ; blah->src.len = srcbase ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } } @@ -129,11 +125,9 @@ static int addlink (stralloc3 *blah, unsigned int dstpos, unsigned int srcpos) || (mkdir(blah->dst.s + dstpos, 0777) == -1) || !stralloc_catb(&blah->src, "/", 1)) { - int e = errno ; blah->src.len = srcbase ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } else /* expand */ @@ -154,21 +148,17 @@ static int addlink (stralloc3 *blah, unsigned int dstpos, unsigned int srcpos) || !stralloc_cats(&blah->src, d->d_name) || !stralloc_0(&blah->src) || (symlink(blah->src.s + srcbase, blah->dst.s + dstbase) == -1)) { - int e = errno ; blah->src.len = srcbase ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } } if (errno) { - int e = errno ; blah->src.len = srcbase ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } } @@ -214,23 +204,19 @@ static int addlink (stralloc3 *blah, unsigned int dstpos, unsigned int srcpos) continue ; if (!stralloc_cats(&blah->tmp, d->d_name) || !stralloc_0(&blah->tmp)) { - int e = errno ; blah->tmp.len = tmpbase ; blah->src.len = srcbase ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } } if (errno) { - int e = errno ; blah->tmp.len = tmpbase ; blah->src.len = srcbase ; blah->dst.len = dstbase ; dir_close(dir) ; - errno = e ; return ERROR ; } dir_close(dir) ; |