diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-02-22 09:46:06 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-02-22 09:46:06 +0000 |
commit | 3d8bdff7395e1f6a7554bd5ff7cdfb001cfeb16d (patch) | |
tree | cf0609c81759114f2cbded56c3b9590632feeb5d /usr.sbin | |
parent | a6be92ba55be1c2cb0e49046c26bc67a14e86119 (diff) |
Rename mkpath() to mkpathat() since it uses mkdirat() internally.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpki-client/extern.h | 4 | ||||
-rw-r--r-- | usr.sbin/rpki-client/main.c | 4 | ||||
-rw-r--r-- | usr.sbin/rpki-client/mkdir.c | 7 |
3 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/rpki-client/extern.h b/usr.sbin/rpki-client/extern.h index ef0106fba73..fb71c6d8fa5 100644 --- a/usr.sbin/rpki-client/extern.h +++ b/usr.sbin/rpki-client/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.46 2021/02/19 08:14:49 claudio Exp $ */ +/* $OpenBSD: extern.h,v 1.47 2021/02/22 09:46:05 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -449,7 +449,7 @@ int output_json(FILE *, struct vrp_tree *, struct stats *); void logx(const char *fmt, ...) __attribute__((format(printf, 1, 2))); -int mkpath(int, const char *); +int mkpathat(int, const char *); #define RPKI_PATH_OUT_DIR "/var/db/rpki-client" #define RPKI_PATH_BASE_DIR "/var/cache/rpki-client" diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index cf4e154db70..19a8fd02274 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.103 2021/02/19 12:18:23 tb Exp $ */ +/* $OpenBSD: main.c,v 1.104 2021/02/22 09:46:05 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -297,7 +297,7 @@ repo_fetch(struct repo *rp) * will not build the destination for us. */ - if (mkpath(cachefd, rp->local) == -1) + if (mkpathat(cachefd, rp->local) == -1) err(1, "%s", rp->local); logx("%s: pulling from network", rp->local); diff --git a/usr.sbin/rpki-client/mkdir.c b/usr.sbin/rpki-client/mkdir.c index 7369c3de4c5..e9a349feef6 100644 --- a/usr.sbin/rpki-client/mkdir.c +++ b/usr.sbin/rpki-client/mkdir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkdir.c,v 1.2 2021/02/19 08:14:49 claudio Exp $ */ +/* $OpenBSD: mkdir.c,v 1.3 2021/02/22 09:46:05 claudio Exp $ */ /* * Copyright (c) 1983, 1992, 1993 @@ -37,13 +37,14 @@ #include "extern.h" /* - * mkpath -- create directories. + * mkpathat -- create directories. + * dirfd - file descriptor for local directory * path - path * mode - file mode of terminal directory * dir_mode - file mode of intermediate directories */ int -mkpath(int dirfd, const char *dir) +mkpathat(int dirfd, const char *dir) { char *path, *slash; int done; |