Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
exec_buf() is only used by pkg version.
Matthew Seaman committed 12 years ago
commit bf891ed8a6c45824fc79b7456a4d124326f8adc8
parent 70647e2
2 files changed +0 -26
modified src/pkgcli.h
@@ -251,7 +251,6 @@ int info_flags(uint64_t opt, bool remote);
void print_info(struct pkg * const pkg, uint64_t opt);
char *absolutepath(const char *src, char *dest, size_t dest_len);
void print_jobs_summary(struct pkg_jobs *j, const char *msg, ...);
-
struct sbuf *exec_buf(const char *cmd);
int hash_file(const char *, char[SHA256_DIGEST_LENGTH * 2 +1]);

int event_callback(void *data, struct pkg_event *ev);
modified src/utils.c
@@ -689,31 +689,6 @@ print_jobs_summary(struct pkg_jobs *jobs, const char *msg, ...)
	}
}

-
struct sbuf *
-
exec_buf(const char *cmd) {
-
	FILE *fp;
-
	char buf[BUFSIZ];
-
	struct sbuf *res;
-

-
	if ((fp = popen(cmd, "r")) == NULL)
-
		return (NULL);
-

-
	res = sbuf_new_auto();
-
	while (fgets(buf, BUFSIZ, fp) != NULL)
-
		sbuf_cat(res, buf);
-

-
	pclose(fp);
-

-
	if (sbuf_len(res) == 0) {
-
		sbuf_delete(res);
-
		return (NULL);
-
	}
-

-
	sbuf_finish(res);
-

-
	return (res);
-
}
-

int
hash_file(const char *path, char out[SHA256_DIGEST_LENGTH * 2 + 1])
{