Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
vrl4.c File Reference
#include <endian.h>
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
#include <errno.h>

Go to the source code of this file.

Data Structures

struct  hdr
 

Macros

#define _BSD_SOURCE
 
#define DECLARE_HDR(h)
 
#define ALIGN_BITS   9
 
#define ALIGN   (1 << ALIGN_BITS)
 
#define START_BASE   0xe55b0000
 
#define MAX_BOOT_PROG_LEN   (16 * 512)
 
#define ROUND_UP(x)   ((x + ALIGN - 1) & ~(ALIGN - 1))
 

Functions

ssize_t do_read (int fd, void *buf, size_t count)
 
ssize_t do_write (int fd, const void *buf, size_t count)
 
ssize_t write_zero (int fd, size_t len)
 
int main (void)
 

Macro Definition Documentation

#define _BSD_SOURCE

Definition at line 31 of file vrl4.c.

#define ALIGN   (1 << ALIGN_BITS)

Definition at line 61 of file vrl4.c.

#define ALIGN_BITS   9

Definition at line 60 of file vrl4.c.

#define DECLARE_HDR (   h)
Value:
struct hdr (h) = { \
.magic1 = htole32(0xea000000), \
.reserved1 = htole32(0x56), \
.magic2 = htole32(0xe59ff008), \
.reserved3 = htole16(0x1) }

Definition at line 52 of file vrl4.c.

#define MAX_BOOT_PROG_LEN   (16 * 512)

Definition at line 76 of file vrl4.c.

#define ROUND_UP (   x)    ((x + ALIGN - 1) & ~(ALIGN - 1))

Definition at line 78 of file vrl4.c.

#define START_BASE   0xe55b0000

Definition at line 63 of file vrl4.c.

Function Documentation

ssize_t do_read ( int  fd,
void buf,
size_t  count 
)

Definition at line 80 of file vrl4.c.

ssize_t do_write ( int  fd,
const void buf,
size_t  count 
)

Definition at line 101 of file vrl4.c.

int main ( void  )

Definition at line 133 of file vrl4.c.

ssize_t write_zero ( int  fd,
size_t  len 
)

Definition at line 120 of file vrl4.c.