/*
- * Copyright (C) 2007-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** Structure passed to the \p print_blob function. */
struct lsblob_action_data {
- /* The flags given at the command line. */
+ /** The flags given at the command line. */
uint32_t flags;
/** Message buffer. */
struct para_buffer pb;
struct lsblob_action_data *lbad = data;
struct osl_object obj;
uint32_t id;
- int ret, ret2;
+ int ret;
if (!(lbad->flags & BLOB_LS_FLAG_LONG))
return para_printf(&lbad->pb, "%s\n", name);
ret = osl_get_object(table, row, BLOBCOL_ID, &obj);
if (ret < 0) {
- ret2 = para_printf(&lbad->pb, "%s: %s\n", name, para_strerror(-ret));
+ para_printf(&lbad->pb, "%s: %s\n", name, para_strerror(-ret));
return ret;
}
id = *(uint32_t *)obj.data;
pmd.loop_col_num = BLOBCOL_ID;
ret = for_each_matching_row(&pmd);
if (ret < 0)
- ret = para_printf(&lbad.pb, "%s\n", para_strerror(-ret));
+ para_printf(&lbad.pb, "%s\n", para_strerror(-ret));
if (lbad.pb.offset)
pass_buffer_as_shm(lbad.pb.buf, lbad.pb.offset, &fd);
free(lbad.pb.buf);
const char *name, void *data)
{
struct rmblob_data *rmbd = data;
- int ret = osl_del_row(table, row), ret2;
+ int ret = osl_del_row(table, row);
if (ret < 0) {
- ret2 = para_printf(&rmbd->pb, "%s: %s\n", name, para_strerror(-ret));
+ para_printf(&rmbd->pb, "%s: %s\n", name, para_strerror(-ret));
return ret;
}
rmbd->num_removed++;
/** Define the \p close function for this blob type. */
#define DEFINE_BLOB_CLOSE(table_name) \
- void table_name ## _close(void) \
+ static void table_name ## _close(void) \
{ \
osl_close_table(table_name ## _table, OSL_MARK_CLEAN); \
table_name ## _table = NULL; \
/** Define the \p create function for this blob type. */
#define DEFINE_BLOB_CREATE(table_name) \
- int table_name ## _create(const char *dir) \
+ static int table_name ## _create(const char *dir) \
{ \
table_name ## _table_desc.dir = dir; \
return osl_create_table(&table_name ## _table_desc); \
}
#define DEFINE_BLOB_OPEN(table_name) \
- int table_name ## _open(const char *dir) \
+ static int table_name ## _open(const char *dir) \
{ \
return blob_open(&table_name ## _table, \
&table_name ## _table_desc, dir); \
#define DEFINE_BLOB_INIT(table_name) \
void table_name ## _init(struct afs_table *t) \
{ \
- t->name = table_name ## _table_desc.name; \
t->open = table_name ## _open; \
t->close = table_name ## _close; \
t->create = table_name ## _create;\