Lines Matching refs:attrib
108 void __irias_delete_attrib(struct ias_attrib *attrib) in __irias_delete_attrib() argument
110 ASSERT(attrib != NULL, return;); in __irias_delete_attrib()
111 ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); in __irias_delete_attrib()
113 if (attrib->name) in __irias_delete_attrib()
114 kfree(attrib->name); in __irias_delete_attrib()
116 irias_delete_value(attrib->value); in __irias_delete_attrib()
117 attrib->magic = ~IAS_ATTRIB_MAGIC; in __irias_delete_attrib()
119 kfree(attrib); in __irias_delete_attrib()
167 int irias_delete_attrib(struct ias_object *obj, struct ias_attrib *attrib) in irias_delete_attrib() argument
173 ASSERT(attrib != NULL, return -1;); in irias_delete_attrib()
176 node = hashbin_remove(obj->attribs, 0, attrib->name); in irias_delete_attrib()
226 struct ias_attrib *attrib; in irias_find_attrib() local
232 attrib = hashbin_find(obj->attribs, 0, name); in irias_find_attrib()
233 if (attrib == NULL) in irias_find_attrib()
236 return attrib; in irias_find_attrib()
245 void irias_add_attrib( struct ias_object *obj, struct ias_attrib *attrib, in irias_add_attrib() argument
251 ASSERT(attrib != NULL, return;); in irias_add_attrib()
252 ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); in irias_add_attrib()
255 attrib->value->owner = owner; in irias_add_attrib()
257 hashbin_insert(obj->attribs, (irda_queue_t *) attrib, 0, attrib->name); in irias_add_attrib()
270 struct ias_attrib *attrib; in irias_object_change_attribute() local
281 attrib = hashbin_find(obj->attribs, 0, attrib_name); in irias_object_change_attribute()
282 if (attrib == NULL) { in irias_object_change_attribute()
288 if ( attrib->value->type != new_value->type) { in irias_object_change_attribute()
294 irias_delete_value(attrib->value); in irias_object_change_attribute()
297 attrib->value = new_value; in irias_object_change_attribute()
312 struct ias_attrib *attrib; in irias_add_integer_attrib() local
318 attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), in irias_add_integer_attrib()
320 if (attrib == NULL) { in irias_add_integer_attrib()
324 memset(attrib, 0, sizeof( struct ias_attrib)); in irias_add_integer_attrib()
326 attrib->magic = IAS_ATTRIB_MAGIC; in irias_add_integer_attrib()
327 attrib->name = strndup(name, IAS_MAX_ATTRIBNAME); in irias_add_integer_attrib()
330 attrib->value = irias_new_integer_value(value); in irias_add_integer_attrib()
332 irias_add_attrib(obj, attrib, owner); in irias_add_integer_attrib()
345 struct ias_attrib *attrib; in irias_add_octseq_attrib() local
353 attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), in irias_add_octseq_attrib()
355 if (attrib == NULL) { in irias_add_octseq_attrib()
359 memset(attrib, 0, sizeof( struct ias_attrib)); in irias_add_octseq_attrib()
361 attrib->magic = IAS_ATTRIB_MAGIC; in irias_add_octseq_attrib()
362 attrib->name = strndup(name, IAS_MAX_ATTRIBNAME); in irias_add_octseq_attrib()
364 attrib->value = irias_new_octseq_value( octets, len); in irias_add_octseq_attrib()
366 irias_add_attrib(obj, attrib, owner); in irias_add_octseq_attrib()
378 struct ias_attrib *attrib; in irias_add_string_attrib() local
386 attrib = (struct ias_attrib *) kmalloc(sizeof( struct ias_attrib), in irias_add_string_attrib()
388 if (attrib == NULL) { in irias_add_string_attrib()
392 memset(attrib, 0, sizeof( struct ias_attrib)); in irias_add_string_attrib()
394 attrib->magic = IAS_ATTRIB_MAGIC; in irias_add_string_attrib()
395 attrib->name = strndup(name, IAS_MAX_ATTRIBNAME); in irias_add_string_attrib()
397 attrib->value = irias_new_string_value(value); in irias_add_string_attrib()
399 irias_add_attrib(obj, attrib, owner); in irias_add_string_attrib()