mirror of
https://github.com/vivier/EMILE.git
synced 2024-11-13 15:05:05 +00:00
move FLOPPY_SECTOR_SIZE, FIRST_LEVEL_SIZE and get_size() to libemile.h
This commit is contained in:
parent
320c1c3ee1
commit
4078826dfd
@ -54,16 +54,4 @@ struct eBootBlock {
|
|||||||
|
|
||||||
#define ASSERT_BB(a) if ( sizeof(eBootBlock_t) != 1024 ) { a }
|
#define ASSERT_BB(a) if ( sizeof(eBootBlock_t) != 1024 ) { a }
|
||||||
|
|
||||||
#define FLOPPY_SECTOR_SIZE 512
|
|
||||||
#define FIRST_LEVEL_SIZE (FLOPPY_SECTOR_SIZE * 2)
|
|
||||||
|
|
||||||
static inline unsigned long get_size(char* file)
|
|
||||||
{
|
|
||||||
struct stat result;
|
|
||||||
|
|
||||||
stat(file, &result);
|
|
||||||
|
|
||||||
return (result.st_size + FLOPPY_SECTOR_SIZE - 1)
|
|
||||||
/ FLOPPY_SECTOR_SIZE * FLOPPY_SECTOR_SIZE;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user