commit 068fd2bf0c2848bb0ee960b1178e229560cadc0c from: Stefan Sperling date: Tue Apr 24 10:27:59 2018 UTC give some privsep functions shorter names commit - 3aca5731dd4bb590a453dd0ab82e31bdb9312916 commit + 068fd2bf0c2848bb0ee960b1178e229560cadc0c blob - 43af9dc4a56b8d4092240a2fe7610e3e90df9dac blob + 76986d61d779c996002c47abcc96117f7c5c7a9d --- lib/got_lib_privsep.h +++ lib/got_lib_privsep.h @@ -129,13 +129,13 @@ const struct got_error *got_privsep_send_obj(struct im 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. */ blob - dc418dad98c66632b60d29c230ae1d355aedd1a8 blob + 3a874e61bc0c9fade6d20095e6be681ad8b584a9 --- lib/object.c +++ lib/object.c @@ -776,7 +776,7 @@ read_commit_object_privsep_child(struct got_object *ob 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 ** 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, 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 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]); blob - a9c67e47ae7b90376c70fcca278cd0d96f40ca2c blob + 71bf646c05ae45da7a0b1a9da854bcbebd59404a --- lib/privsep.c +++ lib/privsep.c @@ -256,7 +256,7 @@ got_privsep_recv_obj(struct got_object **obj, struct i } 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 * } 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 } 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 =