* Just use memset instead of a custom loop to clear the code area.

* Also rename it from pad1 to code_area as that's what it is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33146 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-09-15 16:45:26 +00:00
parent 80377d9af5
commit 9142bf3404

View File

@ -52,14 +52,6 @@ is_extended_type(uint8 type)
}
// fill_buffer
static inline void
fill_buffer(char* buffer, uint32 length, char ch)
{
for (uint32 i = 0; i < length; i++)
buffer[i] = ch;
}
void get_partition_type_string(uint8 type, char* buffer);
// chs
@ -86,10 +78,14 @@ struct partition_descriptor {
// partition_table
struct partition_table {
char pad1[446];
char code_area[446];
partition_descriptor table[4];
uint16 signature;
void clear_code_area() { fill_buffer(pad1, 446, '\0'); }
void clear_code_area()
{
memset(code_area, 0, sizeof(code_area));
}
} _PACKED;
static const uint16 kPartitionTableSectorSignature = 0xaa55;