pkgtools

morpheus pkg tools
git clone git://git.2f30.org/pkgtools
Log | Files | Refs | README | LICENSE

commit 97db38accf23171ea006ca0d6d12c7bfe4debe0c
parent 32a613c0ab2ae1d4998e1a3f4d99ebd566e29234
Author: sin <sin@2f30.org>
Date:   Fri, 30 May 2014 14:34:02 +0100

Use lstat in error messages as opposed to stat

Diffstat:
Minfopkg.c | 4++--
Minstallpkg.c | 2+-
Mremovepkg.c | 2+-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/infopkg.c b/infopkg.c @@ -94,7 +94,7 @@ ownpkg(const char *pkg, const char *f) r = lstat(filename, &sb1); if (r < 0) { - fprintf(stderr, "stat %s: %s\n", f, strerror(errno)); + fprintf(stderr, "lstat %s: %s\n", f, strerror(errno)); exit(EXIT_FAILURE); } if (S_ISREG(sb1.st_mode) == 0) { @@ -124,7 +124,7 @@ ownpkg(const char *pkg, const char *f) r = lstat(buf, &sb2); if (r < 0) { - fprintf(stderr, "stat %s: %s\n", + fprintf(stderr, "lstat %s: %s\n", buf, strerror(errno)); continue; } diff --git a/installpkg.c b/installpkg.c @@ -198,7 +198,7 @@ collisions(const char *prefix, const char *f) if (access(archive_entry_pathname(entry), F_OK) == 0) { r = stat(archive_entry_pathname(entry), &sb); if (r < 0) { - fprintf(stderr, "stat %s: %s\n", + fprintf(stderr, "lstat %s: %s\n", archive_entry_pathname(entry), strerror(errno)); exit(EXIT_FAILURE); diff --git a/removepkg.c b/removepkg.c @@ -140,7 +140,7 @@ removepkg(const char *f) r = lstat(buf, &sb); if (r < 0) { - fprintf(stderr, "stat %s: %s\n", + fprintf(stderr, "lstat %s: %s\n", buf, strerror(errno)); continue; }