Subversion Repositories Kolibri OS

Rev

Rev 4921 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4921 Serge 1
 
2
#include 
6536 serge 3
#include "io.h"
4921 Serge 4
5
 
6
7
 
8
           size_t offset, size_t count, size_t *done)
9
{
10
    *done = 0;
11
    return 10;
12
};
13
14
 
6536 serge 15
//           size_t offset, size_t count, size_t *done) __attribute__ ((alias("fake_io")));
16
17
 
4921 Serge 18
           size_t offset, size_t count, size_t *done)
6536 serge 19
{
20
    printf("%s path:%s buf:%p offset:%d count:%d\n",
21
            __FUNCTION__, path, buff, offset, count);
22
4921 Serge 23
 
6536 serge 24
25
 
4921 Serge 26
           size_t offset, size_t count, size_t *done) __attribute__ ((alias("fake_io")));
27
28
 
29
{
30
    __asm__ __volatile__(
31
    "int $0x40 \n\t"
32
    ::"a"(63), "b"(1),"c"(val));
33
}
34
35
 
36
                 size_t offset, size_t count, size_t *writes)
37
{
38
    int ret = count;
39
    const char *p = buff;
40
41
 
42
    {
43
        debug_out(*p++);
44
    };
45
    *writes = ret;
46
    return ret;
47
};
48
49
 
50
{
51
    __io_handle *ioh;
52
53
 
54
    ioh->mode  = _READ|_ISTTY;
55
    ioh->read  = &fake_io_read;
56
    ioh->write = &fake_io_write;
57
58
 
59
    ioh->mode  = _WRITE|_ISTTY;
60
    ioh->read  = &fake_io_read;
61
    ioh->write = &debugwrite;
62
63
 
64
    ioh->mode  = _WRITE|_ISTTY;
65
    ioh->read  = &fake_io_read;
66
    ioh->write = &debugwrite;
67
68
 
69