give some privsep functions shorter names
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
diff --git a/lib/got_lib_privsep.h b/lib/got_lib_privsep.h
index 43af9dc..76986d6 100644
--- a/lib/got_lib_privsep.h
+++ b/lib/got_lib_privsep.h
@@ -129,13 +129,13 @@ const struct got_error *got_privsep_send_obj(struct imsgbuf *,
struct got_object *, int);
const struct got_error *got_privsep_recv_obj(struct got_object **,
struct imsgbuf *);
-const struct got_error *got_privsep_send_commit_obj(struct imsgbuf *,
+const struct got_error *got_privsep_send_commit(struct imsgbuf *,
struct got_commit_object *);
-const struct got_error *got_privsep_recv_commit_obj(struct got_commit_object **,
+const struct got_error *got_privsep_recv_commit(struct got_commit_object **,
struct imsgbuf *);
-const struct got_error *got_privsep_recv_tree_obj(struct got_tree_object **,
+const struct got_error *got_privsep_recv_tree(struct got_tree_object **,
struct imsgbuf *);
-const struct got_error *got_privsep_send_tree_obj(struct imsgbuf *,
+const struct got_error *got_privsep_send_tree(struct imsgbuf *,
struct got_tree_object *);
/* TODO: Implement the above, and then add more message data types here. */
diff --git a/lib/object.c b/lib/object.c
index dc418da..3a874e6 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -776,7 +776,7 @@ read_commit_object_privsep_child(struct got_object *obj, int obj_fd,
if (err)
goto done;
- err = got_privsep_send_commit_obj(&ibuf, commit);
+ err = got_privsep_send_commit(&ibuf, commit);
done:
if (commit)
got_object_commit_close(commit);
@@ -814,7 +814,7 @@ read_commit_object_privsep(struct got_commit_object **commit,
close(imsg_fds[1]);
imsg_init(&parent_ibuf, imsg_fds[0]);
- err = got_privsep_recv_commit_obj(commit, &parent_ibuf);
+ err = got_privsep_recv_commit(commit, &parent_ibuf);
imsg_clear(&parent_ibuf);
waitpid(pid, &child_status, 0);
close(imsg_fds[0]);
@@ -927,7 +927,7 @@ read_tree_object_privsep_child(struct got_object *obj, int obj_fd,
if (err)
goto done;
- err = got_privsep_send_tree_obj(&ibuf, tree);
+ err = got_privsep_send_tree(&ibuf, tree);
done:
if (tree)
got_object_tree_close(tree);
@@ -965,7 +965,7 @@ read_tree_object_privsep(struct got_tree_object **tree, struct got_object *obj,
close(imsg_fds[1]);
imsg_init(&parent_ibuf, imsg_fds[0]);
- err = got_privsep_recv_tree_obj(tree, &parent_ibuf);
+ err = got_privsep_recv_tree(tree, &parent_ibuf);
imsg_clear(&parent_ibuf);
waitpid(pid, &child_status, 0);
close(imsg_fds[0]);
diff --git a/lib/privsep.c b/lib/privsep.c
index a9c67e4..71bf646 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -256,7 +256,7 @@ got_privsep_recv_obj(struct got_object **obj, struct imsgbuf *ibuf)
}
const struct got_error *
-got_privsep_send_commit_obj(struct imsgbuf *ibuf, struct got_commit_object *commit)
+got_privsep_send_commit(struct imsgbuf *ibuf, struct got_commit_object *commit)
{
const struct got_error *err = NULL;
struct got_imsg_commit_object icommit;
@@ -306,8 +306,7 @@ done:
return err;
}
const struct got_error *
-got_privsep_recv_commit_obj(struct got_commit_object **commit,
- struct imsgbuf *ibuf)
+got_privsep_recv_commit(struct got_commit_object **commit, struct imsgbuf *ibuf)
{
const struct got_error *err = NULL;
struct imsg imsg;
@@ -448,7 +447,7 @@ got_privsep_recv_commit_obj(struct got_commit_object **commit,
}
const struct got_error *
-got_privsep_send_tree_obj(struct imsgbuf *ibuf, struct got_tree_object *tree)
+got_privsep_send_tree(struct imsgbuf *ibuf, struct got_tree_object *tree)
{
const struct got_error *err = NULL;
struct got_imsg_tree_object itree;
@@ -496,7 +495,7 @@ got_privsep_send_tree_obj(struct imsgbuf *ibuf, struct got_tree_object *tree)
}
const struct got_error *
-got_privsep_recv_tree_obj(struct got_tree_object **tree, struct imsgbuf *ibuf)
+got_privsep_recv_tree(struct got_tree_object **tree, struct imsgbuf *ibuf)
{
const struct got_error *err = NULL;
const size_t min_datalen =