Revision 7ce25cf6 xseg/drivers/user/xseg_segdev.c
b/xseg/drivers/user/xseg_segdev.c | ||
---|---|---|
99 | 99 |
return 0; |
100 | 100 |
} |
101 | 101 |
|
102 |
static void *segdev_map(const char *name, uint64_t size) |
|
102 |
static void *segdev_map(const char *name, uint64_t size, struct xseg *seg)
|
|
103 | 103 |
{ |
104 | 104 |
struct xseg *xseg; |
105 | 105 |
int fd; |
106 |
|
|
107 |
if (seg) |
|
108 |
XSEGLOG("struct xseg * not NULL. Ignoring...\n"); |
|
109 |
|
|
106 | 110 |
fd = opendev(); |
107 | 111 |
if (fd < 0) |
108 | 112 |
return NULL; |
... | ... | |
169 | 173 |
|
170 | 174 |
static int segdev_signal(struct xseg *xseg, uint32_t portno) |
171 | 175 |
{ |
172 |
struct xseg_port *port = &xseg->ports[portno]; |
|
173 |
return write(opendev(), &port, sizeof(port)); |
|
176 |
return write(opendev(), &portno, sizeof(portno)); |
|
174 | 177 |
} |
175 | 178 |
|
176 | 179 |
static void *segdev_malloc(uint64_t size) |
Also available in: Unified diff