/* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2013 Free Software Foundation, Inc. * * VAS_EBOOT 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. * * VAS_EBOOT 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 VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_PROCFS_HEADER #define VAS_EBOOT_PROCFS_HEADER 1 #include #include 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 (VAS_EBOOT_AS_LIST_P (&VasEBoot_procfs_entries), VAS_EBOOT_AS_LIST (entry)); } static inline void VasEBoot_procfs_unregister (struct VasEBoot_procfs_entry *entry) { VasEBoot_list_remove (VAS_EBOOT_AS_LIST (entry)); } #endif