kernels/linux-2.4.0/arch/ia64/sn/io/labelcl.c
/*
 * labelcl_info_get_next_LBL - returns the next label entry on the list.
 */
returns the next label entry on the list.
returns the next label entry on the list .
int
labelcl_info_get_next_LBL(devfs_handle_t de,
			   char *buffer,
			   arb_info_desc_t *info_descp,
			   arbitrary_info_t *infop,
			   labelcl_info_place_t *placeptr)
{
	labelcl_info_t	*labelcl_info = NULL;
	uint which_info;
	label_info_t *label_list;
	if ((buffer == NULL) && (infop == NULL))
		return(-1);
	if (placeptr == NULL)
		return(-1);
	if (de == NULL)
		return(-1);
	labelcl_info = devfs_get_info(de);
	if (labelcl_info == NULL)
		return(-1);
	if (labelcl_info->hwcl_magic != LABELCL_MAGIC)
		return(-1);
	which_info = *placeptr;
	if (which_info >= labelcl_info->num_labels) {
		return(-1);
	}
	label_list = (label_info_t *) labelcl_info->label_list;
	if (buffer != NULL)
		strcpy(buffer, label_list[which_info].name);
	if (infop)
		*infop = label_list[which_info].info;
	if (info_descp)
		*info_descp = label_list[which_info].desc;
	*placeptr = which_info + 1;
	return(0);
}
int labelcl_info_get_next_LBL ( devfs_handle_t de , char * buffer , arb_info_desc_t * info_descp , arbitrary_info_t * infop , labelcl_info_place_t * placeptr ) { labelcl_info_t * labelcl_info = NULL ; uint which_info ; label_info_t * label_list ; if ( ( buffer == NULL ) && ( infop == NULL ) ) return ( -1 ) ; if ( placeptr == NULL ) return ( -1 ) ; if ( de == NULL ) return ( -1 ) ; labelcl_info = devfs_get_info ( de ) ; if ( labelcl_info == NULL ) return ( -1 ) ; if ( labelcl_info -> hwcl_magic != LABELCL_MAGIC ) return ( -1 ) ; which_info = * placeptr ; if ( which_info >= labelcl_info -> num_labels ) { return ( -1 ) ; } label_list = ( label_info_t * ) labelcl_info -> label_list ; if ( buffer != NULL ) strcpy ( buffer , label_list [ which_info ] . name ) ; if ( infop ) * infop = label_list [ which_info ] . info ; if ( info_descp ) * info_descp = label_list [ which_info ] . desc ; * placeptr = which_info + 1 ; return ( 0 ) ; }
labelcl_info_get_next_LBL - returns the next label entry on the list.
labelcl_info_get_next_LBL - returns the next label entry on the list .