+ query.size = len + 1 + stdin_obj.size;
+ query.data = para_malloc(query.size);
+ memcpy(query.data, lls_input(0, lpr), len + 1);
+ if (stdin_obj.size > 0)
+ memcpy((char *)query.data + len + 1, stdin_obj.data,
+ stdin_obj.size);
+ free(stdin_obj.data);
+ ret = send_callback_request(f, &query, afs_cb_result_handler, cc);
+ free(query.data);
+ return ret;
+}
+
+static int com_addblob(afs_callback *f, __a_unused const struct lls_command * const cmd,
+ struct command_context *cc, struct lls_parse_result *lpr)
+{
+ char *errctx;
+ int ret = lls(lls_check_arg_count(lpr, 1, 1, &errctx));
+
+ if (ret < 0) {
+ send_errctx(cc, errctx);
+ return ret;
+ }
+ if (!lls_input(0, lpr)[0]) /* empty name is reserved for the dummy row */
+ return -E_BLOB_SYNTAX;
+ return stdin_command(cc, lpr, f);
+}
+
+static int com_mvblob_callback(const struct lls_command * const cmd,
+ struct osl_table *table, struct afs_callback_arg *aca)
+{
+ const char *src, *dest;
+ struct osl_object obj;
+ struct osl_row *row;
+ int ret;
+
+ ret = lls_deserialize_parse_result(aca->query.data, cmd, &aca->lpr);
+ assert(ret >= 0);
+ src = lls_input(0, aca->lpr);
+ dest = lls_input(1, aca->lpr);
+ obj.data = (char *)src;
+ obj.size = strlen(src) + 1;
+ ret = osl(osl_get_row(table, BLOBCOL_NAME, &obj, &row));
+
+ if (ret < 0) {
+ para_printf(&aca->pbout, "cannot find source blob %s\n", src);
+ goto out;
+ }
+ obj.data = (char *)dest;