diff options
Diffstat (limited to 'usr.sbin/pkg_install/create/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 0c6ebdc..619e749 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -95,7 +95,7 @@ pkg_perform(char **pkgs) if (!pkg_in) { cleanup(0); errx(2, "%s: unable to open contents file '%s' for input", - __FUNCTION__, Contents); + __func__, Contents); } } plist.head = plist.tail = NULL; @@ -119,7 +119,7 @@ pkg_perform(char **pkgs) /* Create easy to use NULL-terminated list */ deps = alloca(sizeof(*deps) * ndeps + 1); if (deps == NULL) { - errx(2, "%s: alloca() failed", __FUNCTION__); + errx(2, "%s: alloca() failed", __func__); /* Not reached */ } for (i = 0; Pkgdeps;) { @@ -176,7 +176,7 @@ pkg_perform(char **pkgs) if (asprintf(&cp, "PKG_FORMAT_REVISION:%d.%d", PLIST_FMT_VER_MAJOR, PLIST_FMT_VER_MINOR) == -1) { - errx(2, "%s: asprintf() failed", __FUNCTION__); + errx(2, "%s: asprintf() failed", __func__); } add_plist_top(&plist, PLIST_COMMENT, cp); free(cp); @@ -257,13 +257,13 @@ pkg_perform(char **pkgs) if (!fp) { cleanup(0); errx(2, "%s: can't open file %s for writing", - __FUNCTION__, CONTENTS_FNAME); + __func__, CONTENTS_FNAME); } write_plist(&plist, fp); if (fclose(fp)) { cleanup(0); errx(2, "%s: error while closing %s", - __FUNCTION__, CONTENTS_FNAME); + __func__, CONTENTS_FNAME); } /* And stick it into a tar ball */ @@ -328,11 +328,11 @@ make_dist(const char *homedir, const char *pkg, const char *suff, Package *plist /* Set up a pipe for passing the filenames, and fork off a tar process. */ if (pipe(pipefds) == -1) { cleanup(0); - errx(2, "%s: cannot create pipe", __FUNCTION__); + errx(2, "%s: cannot create pipe", __func__); } if ((pid = fork()) == -1) { cleanup(0); - errx(2, "%s: cannot fork process for tar", __FUNCTION__); + errx(2, "%s: cannot fork process for tar", __func__); } if (pid == 0) { /* The child */ dup2(pipefds[0], 0); @@ -340,14 +340,14 @@ make_dist(const char *homedir, const char *pkg, const char *suff, Package *plist close(pipefds[1]); execv("/usr/bin/tar", (char * const *)(uintptr_t)args); cleanup(0); - errx(2, "%s: failed to execute tar command", __FUNCTION__); + errx(2, "%s: failed to execute tar command", __func__); } /* Meanwhile, back in the parent process ... */ close(pipefds[0]); if ((totar = fdopen(pipefds[1], "w")) == NULL) { cleanup(0); - errx(2, "%s: fdopen failed", __FUNCTION__); + errx(2, "%s: fdopen failed", __func__); } fprintf(totar, "%s\n", CONTENTS_FNAME); @@ -383,7 +383,7 @@ make_dist(const char *homedir, const char *pkg, const char *suff, Package *plist /* assume either signal or bad exit is enough for us */ if (ret) { cleanup(0); - errx(2, "%s: tar command failed with code %d", __FUNCTION__, ret); + errx(2, "%s: tar command failed with code %d", __func__, ret); } } @@ -393,17 +393,17 @@ sanity_check() if (!Comment) { cleanup(0); errx(2, "%s: required package comment string is missing (-c comment)", - __FUNCTION__); + __func__); } if (!Desc) { cleanup(0); errx(2, "%s: required package description string is missing (-d desc)", - __FUNCTION__); + __func__); } if (!Contents) { cleanup(0); errx(2, "%s: required package contents list is missing (-f [-]file)", - __FUNCTION__); + __func__); } } |