52 lines
1.5 KiB
C
52 lines
1.5 KiB
C
/*
|
|
* VasEBoot -- GRand Unified Bootloader
|
|
* Copyright (C) 2013 Free Software Foundation, Inc.
|
|
*
|
|
* VasEBoot is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* VasEBoot is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef VasEBoot_PROCFS_HEADER
|
|
#define VasEBoot_PROCFS_HEADER 1
|
|
|
|
#include <VasEBoot/list.h>
|
|
#include <VasEBoot/types.h>
|
|
|
|
struct VasEBoot_procfs_entry
|
|
{
|
|
struct VasEBoot_procfs_entry *next;
|
|
struct VasEBoot_procfs_entry **prev;
|
|
|
|
const char *name;
|
|
char * (*get_contents) (VasEBoot_size_t *sz);
|
|
};
|
|
|
|
extern struct VasEBoot_procfs_entry *VasEBoot_procfs_entries;
|
|
|
|
static inline void
|
|
VasEBoot_procfs_register (const char *name __attribute__ ((unused)),
|
|
struct VasEBoot_procfs_entry *entry)
|
|
{
|
|
VasEBoot_list_push (VasEBoot_AS_LIST_P (&VasEBoot_procfs_entries),
|
|
VasEBoot_AS_LIST (entry));
|
|
}
|
|
|
|
static inline void
|
|
VasEBoot_procfs_unregister (struct VasEBoot_procfs_entry *entry)
|
|
{
|
|
VasEBoot_list_remove (VasEBoot_AS_LIST (entry));
|
|
}
|
|
|
|
|
|
#endif
|