Split vnet driver to generic vnet part, tap and file interfaces
Fix most compilation issues of umka_shell on Windows(R)(TM), not all of them.
This commit is contained in:
51
windows/io_async.c
Normal file
51
windows/io_async.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
UMKa - User-Mode KolibriOS developer tools
|
||||
io_async - input/output platform specific code
|
||||
|
||||
Copyright (C) 2023 Ivan Baravy <dunkaist@gmail.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include "umka.h"
|
||||
|
||||
#define QUEUE_DEPTH 1
|
||||
|
||||
#define read_barrier() __asm__ __volatile__("":::"memory")
|
||||
#define write_barrier() __asm__ __volatile__("":::"memory")
|
||||
|
||||
#define MAX(x, y) ((x) >= (y) ? (x) : (y))
|
||||
|
||||
void *
|
||||
io_async_init() {
|
||||
fprintf(stderr, "[io_async] not implemented for windows\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
io_async_close(void *arg) {
|
||||
(void)arg;
|
||||
}
|
||||
|
||||
ssize_t
|
||||
io_async_read(int fd, void *buf, size_t count, void *arg) {
|
||||
(void)fd;
|
||||
(void)buf;
|
||||
(void)count;
|
||||
(void)arg;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ssize_t
|
||||
io_async_write(int fd, const void *buf, size_t count, void *arg) {
|
||||
(void)fd;
|
||||
(void)buf;
|
||||
(void)count;
|
||||
(void)arg;
|
||||
return -1;
|
||||
}
|
@@ -17,6 +17,11 @@ char pci_path[UMKA_PATH_MAX] = ".";
|
||||
__attribute__((stdcall)) uint32_t pci_read(uint32_t bus, uint32_t dev,
|
||||
uint32_t fun, uint32_t offset,
|
||||
size_t len) {
|
||||
(void)bus;
|
||||
(void)dev;
|
||||
(void)fun;
|
||||
(void)offset;
|
||||
(void)len;
|
||||
printf("STUB: %s:%d", __FILE__, __LINE__);
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ void reset_procmask(void) {
|
||||
}
|
||||
|
||||
int get_fake_if(void *ctx) {
|
||||
(void)ctx;
|
||||
printf("STUB: %s:%d", __FILE__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
|
16
windows/vnet/tap.c
Normal file
16
windows/vnet/tap.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
UMKa - User-Mode KolibriOS developer tools
|
||||
vnet - virtual network card, tap interface
|
||||
|
||||
Copyright (C) 2023 Ivan Baravy <dunkaist@gmail.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
struct vnet *
|
||||
vnet_init_tap() {
|
||||
fprintf(stderr, "[vnet] tap interface isn't implemented for windows\n");
|
||||
return NULL;
|
||||
}
|
Reference in New Issue
Block a user