-/*
- * Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
/** \file blob.c Macros and functions for blob handling. */
/** Define a pointer to an osl blob table with a canonical name. */
#define DEFINE_BLOB_TABLE_PTR(table_name) struct osl_table *table_name ## _table;
-
/** Define a blob table. */
#define INIT_BLOB_TABLE(table_name) \
DEFINE_BLOB_TABLE_DESC(table_name); \
.action = print_blob,
};
int ret;
+
ret = lls_deserialize_parse_result(aca->query.data, cmd, &aca->lpr);
pmd.lpr = aca->lpr;
assert(ret >= 0);
.data = &aca->fd,
.action = cat_blob
};
+
ret = lls_deserialize_parse_result(aca->query.data, cmd, &aca->lpr);
assert(ret >= 0);
pmd.lpr = aca->lpr;
{
struct afs_callback_arg *aca = data;
int ret = osl(osl_del_row(table, row));
+
if (ret < 0) {
para_printf(&aca->pbout, "cannot remove %s\n", name);
return ret;
.data = aca,
.action = remove_blob
};
+
ret = lls_deserialize_parse_result(aca->query.data, cmd, &aca->lpr);
assert(ret >= 0);
pmd.lpr = aca->lpr;
*
* This function is called from the addblob command handlers to instruct the
* afs process to store the input in a blob table. Input is read and decrypted
- * from the file descriptor given by cc and appended to arg_obj, which contains
+ * from the file descriptor given by cc and appended to a buffer which also contains
* the name of the blob to create. The combined buffer is made available to the
* afs process via the callback method.
*/
return blob_get_name_by_id(table_name ## _table, id, name); \
}
-
static int blob_get_def_by_name(struct osl_table *table, char *name,
struct osl_object *def)
{
{
struct osl_object obj;
int ret = osl(osl_get_object(table, row, BLOBCOL_NAME, &obj));
+
if (ret < 0)
return ret;
*name = obj.data;
const char *dir)
{
int ret;
+
desc->dir = dir;
ret = osl(osl_open_table(desc, table));
if (ret >= 0)