X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Ffs_sysfs.h;h=aac64d9121e1c748f57879cfe84b114b749d6fef;hb=9e5fa402ca899be7d2b49980d6a45340c9bece55;hp=61a6d48b469c989238ecc3501d38a4f39ffd8bba;hpb=243bdab4e7acc8516d9b1c138f45dc1195f97767;p=tpg%2Facess2.git diff --git a/Kernel/include/fs_sysfs.h b/Kernel/include/fs_sysfs.h index 61a6d48b..aac64d91 100644 --- a/Kernel/include/fs_sysfs.h +++ b/Kernel/include/fs_sysfs.h @@ -2,11 +2,40 @@ * Acess2 * - SysFS Export Header */ +/** + * \file fs_sysfs.h + * \brief ProcDev/SysFS Interface + * \author John Hodge (thePowersGang) + * + * + */ #ifndef _FS_SYSFS_H_ #define _FS_SYSFS_H_ -extern int SysFS_RegisterFile(char *Path, char *Data, int Length); -extern int SysFS_UpdateFile(int ID, char *Data, int Length); +/** + * \brief Registers a file in the SysFS tree + * \param Path Path relative to the SysFS root (no .. or .) + * \param Data File buffer address + * \param Length Length of the file buffer + * \return An ID number to refer to the file, or -1 on error + * \note \a Data must be maintained until ::SysFS_UpdateFile is called + * with a different buffer, or ::SysFS_RemoveFile is called. + */ +extern int SysFS_RegisterFile(const char *Path, const char *Data, int Length); + +/** + * \brief Updates the size/pointer associated with a SysFD file + * \param ID Number returned by ::SysFS_RegisterFile + * \param Data New buffer address + * \param Length New length of the file + * \return Boolean Success + */ +extern int SysFS_UpdateFile(int ID, const char *Data, int Length); + +/** + * \brief Removes a file from the SysFS tree + * \param ID Number returned by ::SysFS_RegisterFile + */ extern int SysFS_RemoveFile(int ID); #endif