commit: ec10bc915b138dc729ee42faf152d2ae0a63331a
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 23:33:17 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 23:33:17 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ec10bc91
libq: drop unused xgetcwd/xreadlink helpers
.depend | 13 ++++++-------
Makefile.am | 2 --
libq/libq.c | 2 --
libq/xgetcwd.c | 17 -----------------
libq/xreadlink.c | 17 -----------------
5 files changed, 6 insertions(+), 45 deletions(-)
diff --git a/.depend b/.depend
index 3b63d1f..d824273 100644
--- a/.depend
+++ b/.depend
@@ -2,10 +2,9 @@ main.o: main.c porting.h main.h libq/libq.c libq/busybox.h
libq/i18n.h \
libq/libq.h libq/colors.c libq/xmalloc.c libq/xstrdup.c libq/xasprintf.c \
libq/hash_fd.c libq/md5_sha1_sum.c libq/human_readable.c libq/rmspace.c \
libq/compat.c libq/copy_file.c libq/safe_io.c libq/xchdir.c \
- libq/xgetcwd.c libq/xmkdir.c libq/xreadlink.c libq/xregex.c \
- libq/xsystem.c libq/xarray.c libq/atom_explode.c libq/atom_compare.c \
- libq/basename.c libq/scandirat.c libq/prelink.c libq/profile.c \
- libq/vdb.c libq/vdb_get_next_dir.c libq/virtuals.c applets.h \
- include_applets.h q.c qcheck.c qdepends.c qfile.c qlist.c qlop.c \
- qsearch.c qsize.c qtbz2.c quse.c qxpak.c qpkg.c qgrep.c qatom.c qmerge.c \
- qcache.c qglsa.c
+ libq/xmkdir.c libq/xregex.c libq/xsystem.c libq/xarray.c \
+ libq/atom_explode.c libq/atom_compare.c libq/basename.c libq/scandirat.c \
+ libq/prelink.c libq/profile.c libq/vdb.c libq/vdb_get_next_dir.c \
+ libq/virtuals.c applets.h include_applets.h q.c qcheck.c qdepends.c \
+ qfile.c qlist.c qlop.c qsearch.c qsize.c qtbz2.c quse.c qxpak.c qpkg.c \
+ qgrep.c qatom.c qmerge.c qcache.c qglsa.c
diff --git a/Makefile.am b/Makefile.am
index 7b9c35b..7d4a301 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,10 +122,8 @@ EXTRA_DIST += \
libq/xarray.c \
libq/xasprintf.c \
libq/xchdir.c \
- libq/xgetcwd.c \
libq/xmalloc.c \
libq/xmkdir.c \
- libq/xreadlink.c \
libq/xregex.c \
libq/xstrdup.c \
libq/xsystem.c \
diff --git a/libq/libq.c b/libq/libq.c
index 5c6eb5c..28fe5d1 100644
--- a/libq/libq.c
+++ b/libq/libq.c
@@ -22,9 +22,7 @@
#include "copy_file.c"
#include "safe_io.c"
#include "xchdir.c"
-#include "xgetcwd.c"
#include "xmkdir.c"
-#include "xreadlink.c"
#include "xregex.c"
#include "xsystem.c"
#include "xarray.c"
diff --git a/libq/xgetcwd.c b/libq/xgetcwd.c
deleted file mode 100644
index 31f531d..0000000
--- a/libq/xgetcwd.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * utility funcs
- *
- * Copyright 2005-2014 Gentoo Foundation
- * Distributed under the terms of the GNU General Public License v2
- */
-
-#include <unistd.h>
-
-char *xgetcwd(char *buf, size_t size);
-char *xgetcwd(char *buf, size_t size)
-{
- char *ret = getcwd(buf, size);
- if (unlikely(ret == NULL))
- errp("getcwd() failed");
- return ret;
-}
diff --git a/libq/xreadlink.c b/libq/xreadlink.c
deleted file mode 100644
index 872264f..0000000
--- a/libq/xreadlink.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * utility funcs
- *
- * Copyright 2005-2014 Gentoo Foundation
- * Distributed under the terms of the GNU General Public License v2
- */
-
-#include <unistd.h>
-
-ssize_t xreadlink(const char *path, char *buf, size_t bufsiz);
-ssize_t xreadlink(const char *path, char *buf, size_t bufsiz)
-{
- ssize_t ret = readlink(path, buf, bufsiz);
- if (unlikely(ret == -1))
- errp("readlink(%s) failed", path);
- return ret;
-}