Print this page
patch tsoome-feedback


 363 /*
 364  * Generic object data functions. We hide nvlist implementation
 365  * from NCP, ENM and location implementations.
 366  */
 367 nwam_error_t
 368 nwam_alloc_object_list(void *list)
 369 {
 370         int nverr;
 371 
 372         assert(list != NULL);
 373 
 374         if ((nverr = nvlist_alloc((nvlist_t **)list, NV_UNIQUE_NAME, 0)) != 0)
 375                 return (nwam_errno_to_nwam_error(nverr));
 376 
 377         return (NWAM_SUCCESS);
 378 }
 379 
 380 void
 381 nwam_free_object_list(void *list)
 382 {
 383         if (list != NULL)
 384                 nvlist_free(list);
 385 }
 386 
 387 nwam_error_t
 388 nwam_dup_object_list(void *oldlist, void *newlist)
 389 {
 390         int nverr;
 391 
 392         assert(oldlist != NULL && newlist != NULL);
 393 
 394         if ((nverr = nvlist_dup(oldlist, newlist, 0)) != 0)
 395                 return (nwam_errno_to_nwam_error(nverr));
 396 
 397         return (NWAM_SUCCESS);
 398 }
 399 
 400 /* Add child object list to parent object list using property name childname */
 401 nwam_error_t
 402 nwam_object_list_add_object_list(void *parentlist, char *childname,
 403     void *childlist)




 363 /*
 364  * Generic object data functions. We hide nvlist implementation
 365  * from NCP, ENM and location implementations.
 366  */
 367 nwam_error_t
 368 nwam_alloc_object_list(void *list)
 369 {
 370         int nverr;
 371 
 372         assert(list != NULL);
 373 
 374         if ((nverr = nvlist_alloc((nvlist_t **)list, NV_UNIQUE_NAME, 0)) != 0)
 375                 return (nwam_errno_to_nwam_error(nverr));
 376 
 377         return (NWAM_SUCCESS);
 378 }
 379 
 380 void
 381 nwam_free_object_list(void *list)
 382 {

 383         nvlist_free(list);
 384 }
 385 
 386 nwam_error_t
 387 nwam_dup_object_list(void *oldlist, void *newlist)
 388 {
 389         int nverr;
 390 
 391         assert(oldlist != NULL && newlist != NULL);
 392 
 393         if ((nverr = nvlist_dup(oldlist, newlist, 0)) != 0)
 394                 return (nwam_errno_to_nwam_error(nverr));
 395 
 396         return (NWAM_SUCCESS);
 397 }
 398 
 399 /* Add child object list to parent object list using property name childname */
 400 nwam_error_t
 401 nwam_object_list_add_object_list(void *parentlist, char *childname,
 402     void *childlist)