-/*
- * Copyright (C) 1997 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 1997 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
/** \file attribute.c Attribute handling functions. */
return 1;
}
-/** Data passed to the action function of lsatt */
+/* Data passed to the action function of lsatt */
static int print_attribute(struct osl_table *table, struct osl_row *row,
const char *name, void *data)
{
}
EXPORT_SERVER_CMD_HANDLER(lsatt);
-struct addatt_event_data {
- const char *name;
- unsigned char bitnum;
-};
-
static int com_addatt_callback(struct afs_callback_arg *aca)
{
const struct lls_command *cmd = SERVER_CMD_CMD_PTR(ADDATT);
struct osl_object objs[NUM_ATT_COLUMNS];
struct osl_row *row;
unsigned char bitnum;
- struct addatt_event_data aed;
len = strlen(name);
if (len == 0 || name[len - 1] == '-' || name[len - 1] == '+') {
ret = osl(osl_add_row(attribute_table, objs));
if (ret < 0)
goto out;
- aed.name = name;
- aed.bitnum = bitnum;
- ret = afs_event(ATTRIBUTE_ADD, &aca->pbout, &aed);
+ ret = afs_event(ATTRIBUTE_ADD, &aca->pbout, NULL);
if (ret < 0)
goto out;
greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, (int)bitnum);
if (ret < 0)
para_printf(&aca->pbout, "error while adding %s\n",
lls_input(i, aca->lpr));
+ lls_free_parse_result(aca->lpr, cmd);
return ret;
}
return aft_check_attributes(att_mask, &aca->pbout);
}
-/**
- * Close the attribute table.
- *
- * \sa osl_close_table().
- */
static void attribute_close(void)
{
osl_close_table(attribute_table, OSL_MARK_CLEAN);
attribute_table = NULL;
}
-/**
- * Open the attribute table.
- *
- * \param dir The database directory.
- *
- * \return Positive on success, negative on errors.
- *
- * \sa osl_open_table().
- */
static int attribute_open(const char *dir)
{
int ret;