1 |
commit: ec10bc915b138dc729ee42faf152d2ae0a63331a |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 28 23:33:17 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 28 23:33:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ec10bc91 |
7 |
|
8 |
libq: drop unused xgetcwd/xreadlink helpers |
9 |
|
10 |
.depend | 13 ++++++------- |
11 |
Makefile.am | 2 -- |
12 |
libq/libq.c | 2 -- |
13 |
libq/xgetcwd.c | 17 ----------------- |
14 |
libq/xreadlink.c | 17 ----------------- |
15 |
5 files changed, 6 insertions(+), 45 deletions(-) |
16 |
|
17 |
diff --git a/.depend b/.depend |
18 |
index 3b63d1f..d824273 100644 |
19 |
--- a/.depend |
20 |
+++ b/.depend |
21 |
@@ -2,10 +2,9 @@ main.o: main.c porting.h main.h libq/libq.c libq/busybox.h libq/i18n.h \ |
22 |
libq/libq.h libq/colors.c libq/xmalloc.c libq/xstrdup.c libq/xasprintf.c \ |
23 |
libq/hash_fd.c libq/md5_sha1_sum.c libq/human_readable.c libq/rmspace.c \ |
24 |
libq/compat.c libq/copy_file.c libq/safe_io.c libq/xchdir.c \ |
25 |
- libq/xgetcwd.c libq/xmkdir.c libq/xreadlink.c libq/xregex.c \ |
26 |
- libq/xsystem.c libq/xarray.c libq/atom_explode.c libq/atom_compare.c \ |
27 |
- libq/basename.c libq/scandirat.c libq/prelink.c libq/profile.c \ |
28 |
- libq/vdb.c libq/vdb_get_next_dir.c libq/virtuals.c applets.h \ |
29 |
- include_applets.h q.c qcheck.c qdepends.c qfile.c qlist.c qlop.c \ |
30 |
- qsearch.c qsize.c qtbz2.c quse.c qxpak.c qpkg.c qgrep.c qatom.c qmerge.c \ |
31 |
- qcache.c qglsa.c |
32 |
+ libq/xmkdir.c libq/xregex.c libq/xsystem.c libq/xarray.c \ |
33 |
+ libq/atom_explode.c libq/atom_compare.c libq/basename.c libq/scandirat.c \ |
34 |
+ libq/prelink.c libq/profile.c libq/vdb.c libq/vdb_get_next_dir.c \ |
35 |
+ libq/virtuals.c applets.h include_applets.h q.c qcheck.c qdepends.c \ |
36 |
+ qfile.c qlist.c qlop.c qsearch.c qsize.c qtbz2.c quse.c qxpak.c qpkg.c \ |
37 |
+ qgrep.c qatom.c qmerge.c qcache.c qglsa.c |
38 |
|
39 |
diff --git a/Makefile.am b/Makefile.am |
40 |
index 7b9c35b..7d4a301 100644 |
41 |
--- a/Makefile.am |
42 |
+++ b/Makefile.am |
43 |
@@ -122,10 +122,8 @@ EXTRA_DIST += \ |
44 |
libq/xarray.c \ |
45 |
libq/xasprintf.c \ |
46 |
libq/xchdir.c \ |
47 |
- libq/xgetcwd.c \ |
48 |
libq/xmalloc.c \ |
49 |
libq/xmkdir.c \ |
50 |
- libq/xreadlink.c \ |
51 |
libq/xregex.c \ |
52 |
libq/xstrdup.c \ |
53 |
libq/xsystem.c \ |
54 |
|
55 |
diff --git a/libq/libq.c b/libq/libq.c |
56 |
index 5c6eb5c..28fe5d1 100644 |
57 |
--- a/libq/libq.c |
58 |
+++ b/libq/libq.c |
59 |
@@ -22,9 +22,7 @@ |
60 |
#include "copy_file.c" |
61 |
#include "safe_io.c" |
62 |
#include "xchdir.c" |
63 |
-#include "xgetcwd.c" |
64 |
#include "xmkdir.c" |
65 |
-#include "xreadlink.c" |
66 |
#include "xregex.c" |
67 |
#include "xsystem.c" |
68 |
#include "xarray.c" |
69 |
|
70 |
diff --git a/libq/xgetcwd.c b/libq/xgetcwd.c |
71 |
deleted file mode 100644 |
72 |
index 31f531d..0000000 |
73 |
--- a/libq/xgetcwd.c |
74 |
+++ /dev/null |
75 |
@@ -1,17 +0,0 @@ |
76 |
-/* |
77 |
- * utility funcs |
78 |
- * |
79 |
- * Copyright 2005-2014 Gentoo Foundation |
80 |
- * Distributed under the terms of the GNU General Public License v2 |
81 |
- */ |
82 |
- |
83 |
-#include <unistd.h> |
84 |
- |
85 |
-char *xgetcwd(char *buf, size_t size); |
86 |
-char *xgetcwd(char *buf, size_t size) |
87 |
-{ |
88 |
- char *ret = getcwd(buf, size); |
89 |
- if (unlikely(ret == NULL)) |
90 |
- errp("getcwd() failed"); |
91 |
- return ret; |
92 |
-} |
93 |
|
94 |
diff --git a/libq/xreadlink.c b/libq/xreadlink.c |
95 |
deleted file mode 100644 |
96 |
index 872264f..0000000 |
97 |
--- a/libq/xreadlink.c |
98 |
+++ /dev/null |
99 |
@@ -1,17 +0,0 @@ |
100 |
-/* |
101 |
- * utility funcs |
102 |
- * |
103 |
- * Copyright 2005-2014 Gentoo Foundation |
104 |
- * Distributed under the terms of the GNU General Public License v2 |
105 |
- */ |
106 |
- |
107 |
-#include <unistd.h> |
108 |
- |
109 |
-ssize_t xreadlink(const char *path, char *buf, size_t bufsiz); |
110 |
-ssize_t xreadlink(const char *path, char *buf, size_t bufsiz) |
111 |
-{ |
112 |
- ssize_t ret = readlink(path, buf, bufsiz); |
113 |
- if (unlikely(ret == -1)) |
114 |
- errp("readlink(%s) failed", path); |
115 |
- return ret; |
116 |
-} |