31 lines
411 B
C
31 lines
411 B
C
|
|
#include <assert.h>
|
|
#include <unistd.h>
|
|
#include <stddef.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include "struct.h"
|
|
#include "write.h"
|
|
|
|
void file_ostream_write(
|
|
struct ostream* super,
|
|
const uint8_t* data,
|
|
size_t len)
|
|
{
|
|
ENTER;
|
|
|
|
struct file_ostream* const this = (void*) super;
|
|
|
|
ssize_t retval = write(this->fd, data, len);
|
|
|
|
if (retval < 0)
|
|
{
|
|
TODO;
|
|
}
|
|
|
|
EXIT;
|
|
}
|
|
|
|
|
|
|