diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2022-04-09 15:12:17 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2022-04-09 15:12:17 +0000 |
commit | 0266e9380f400247ff4dd89ac165210168d8813a (patch) | |
tree | 896eba2703e3e0300a61e31f2c38fb469608a6aa /src | |
parent | 958ddeff987d127a7e1a56647963dab9a00d64ed (diff) | |
download | s6-portable-utils-0266e9380f400247ff4dd89ac165210168d8813a.tar.gz s6-portable-utils-0266e9380f400247ff4dd89ac165210168d8813a.tar.xz s6-portable-utils-0266e9380f400247ff4dd89ac165210168d8813a.zip |
Prepare for 2.2.4.1; adapt to skalibs-2.12.0.0
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/skaembutils/s6-uniquename.c | 4 | ||||
-rw-r--r-- | src/skaembutils/s6-update-symlinks.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/skaembutils/s6-uniquename.c b/src/skaembutils/s6-uniquename.c index d9766fe..988179e 100644 --- a/src/skaembutils/s6-uniquename.c +++ b/src/skaembutils/s6-uniquename.c @@ -31,10 +31,8 @@ int main (int argc, char const *const *argv) argc -= l.ind ; argv += l.ind ; } if (argc < 1) usage() ; - if (!random_init()) - strerr_diefu1sys(111, "init random generator") ; if (!stralloc_cats(&sa, argv[0])) strerr_diefu1sys(111, "stralloc_cats") ; - if (!(n ? random_sauniquename(&sa, n) : sauniquename(&sa))) + if (!(n ? random_sauniquename_early(&sa, n) : sauniquename(&sa))) strerr_diefu1sys(111, "make unique name") ; if (!stralloc_catb(&sa, "\n", 1)) strerr_diefu1sys(111, "stralloc_cats") ; if (allwrite(1, sa.s, sa.len) < sa.len) strerr_diefu1sys(111, "write to stdout") ; diff --git a/src/skaembutils/s6-update-symlinks.c b/src/skaembutils/s6-update-symlinks.c index 6acb77c..770827e 100644 --- a/src/skaembutils/s6-update-symlinks.c +++ b/src/skaembutils/s6-update-symlinks.c @@ -5,6 +5,7 @@ #include <unistd.h> #include <errno.h> #include <stdio.h> + #include <skalibs/direntry.h> #include <skalibs/strerr2.h> #include <skalibs/stralloc.h> @@ -292,8 +293,6 @@ int main (int argc, char *const *argv) while (i && (argv[1][i-1] == '/')) argv[1][--i] = 0 ; if (!i) strerr_diefu1x(100, "replace root directory") ; } - if (!random_init()) - strerr_diefu1sys(111, "init random generator") ; if (!makeuniquename(&blah.dst, argv[1], MAGICNEW)) strerr_diefu2sys(111, "make random unique name based on ", argv[1]) ; if ((unlink(blah.dst.s) == -1) && (errno != ENOENT)) |