commit some source

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
2019-06-03 09:57:25 +08:00
parent 2afca97177
commit 5fb4ea8474
7 changed files with 297 additions and 0 deletions

14
include/fat12.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef PANG_O_LIN_FAT12_H__
#define PANG_O_LIN_FAT12_H__
#include <stdint.h>
void fat12_write_u16(void *ptr, uint16_t val);
uint16_t fat12_read_u16(void *ptr);
void fat12_set_cluster(void *fat, uint32_t cluster, uint32_t value);
uint32_t fat12_get_cluster(void *fat, uint32_t cluster);
int fat12_defrag(int fd);
int fat12_mkfs(int fd, uint32_t bytes);
#endif /* PANG_O_LIN_FAT12_H__ */

14
include/io.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef PANG_O_LIN_IO_H__
#define PANG_O_LIN_IO_H__
#include <sys/types.h>
#ifdef unix
#include <unistd.h>
#endif
ssize_t pang_write(int fd, const void *buf, size_t count);
ssize_t pang_read(int fd, void *buf, size_t count);
off_t pang_seek(int fd, off_t offset, int whence);
#endif /* PANG_O_LIN_IO_H__ */