diff options
author | alfred <alfred@FreeBSD.org> | 2002-05-11 04:17:55 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-05-11 04:17:55 +0000 |
commit | c94931edf30d81eb9084c24694ba4af15517fdad (patch) | |
tree | 9297bf30ccd1af2a38e1970e4796b24b86ae5c73 /usr.sbin/pkg_install/create | |
parent | df59877e64c2c065850c9512c642219ffc4475a3 (diff) | |
download | FreeBSD-src-c94931edf30d81eb9084c24694ba4af15517fdad.zip FreeBSD-src-c94931edf30d81eb9084c24694ba4af15517fdad.tar.gz |
replace __FUNCTION__ with standardized __func__.
Requested by: jhb
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 26 | ||||
-rw-r--r-- | usr.sbin/pkg_install/create/pl.c | 8 |
2 files changed, 17 insertions, 17 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__); } } diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c index 0859e1f..9970249 100644 --- a/usr.sbin/pkg_install/create/pl.c +++ b/usr.sbin/pkg_install/create/pl.c @@ -102,7 +102,7 @@ trylink(const char *from, const char *to) strcat(where_args, "|tar xpf -"); \ if (system(where_args)) { \ cleanup(0); \ - errx(2, "%s: can't invoke tar pipeline", __FUNCTION__); \ + errx(2, "%s: can't invoke tar pipeline", __func__); \ } \ memset(where_args, 0, maxargs); \ last_chdir = NULL; \ @@ -134,7 +134,7 @@ copy_plist(const char *home, Package *plist) where_args = malloc(maxargs); if (!where_args) { cleanup(0); - errx(2, "%s: can't get argument list space", __FUNCTION__); + errx(2, "%s: can't get argument list space", __func__); } memset(where_args, 0, maxargs); @@ -203,7 +203,7 @@ copy_plist(const char *home, Package *plist) } if (add_count < 0 || add_count > maxargs - where_count) { cleanup(0); - errx(2, "%s: oops, miscounted strings!", __FUNCTION__); + errx(2, "%s: oops, miscounted strings!", __func__); } where_count += add_count; } @@ -241,7 +241,7 @@ copy_plist(const char *home, Package *plist) p->name); if (add_count < 0 || add_count > maxargs - where_count) { cleanup(0); - errx(2, "%s: oops, miscounted strings!", __FUNCTION__); + errx(2, "%s: oops, miscounted strings!", __func__); } where_count += add_count; last_chdir = (mythere ? mythere : where); |