gelf_getclass.c revision 164190
1116518Sphk/*-
2116518Sphk * Copyright (c) 2006 Joseph Koshy
3116518Sphk * All rights reserved.
4116518Sphk *
5116518Sphk * Redistribution and use in source and binary forms, with or without
6116518Sphk * modification, are permitted provided that the following conditions
7116518Sphk * are met:
8116518Sphk * 1. Redistributions of source code must retain the above copyright
9116518Sphk *    notice, this list of conditions and the following disclaimer.
10116518Sphk * 2. Redistributions in binary form must reproduce the above copyright
11116518Sphk *    notice, this list of conditions and the following disclaimer in the
12116518Sphk *    documentation and/or other materials provided with the distribution.
13116518Sphk *
14116518Sphk * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15116518Sphk * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16116518Sphk * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17116518Sphk * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18116518Sphk * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19116518Sphk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20116518Sphk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21116518Sphk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22116518Sphk * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23116518Sphk * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24116518Sphk * SUCH DAMAGE.
25116518Sphk */
26116518Sphk
27116518Sphk#include <sys/cdefs.h>
28116518Sphk__FBSDID("$FreeBSD: head/lib/libelf/gelf_getclass.c 164190 2006-11-11 17:16:35Z jkoshy $");
29116518Sphk
30116518Sphk#include <gelf.h>
31116518Sphk
32116518Sphk#include "_libelf.h"
33116518Sphk
34116518Sphkint
35116518Sphkgelf_getclass(Elf *e)
36116518Sphk{
37116518Sphk	return (e != NULL ? e->e_class : ELFCLASSNONE);
38116518Sphk}
39116518Sphk