diff --git a/kernel/linker.ld b/kernel/linker.ld index 66b3e1e9d..8f0e1dbdd 100644 --- a/kernel/linker.ld +++ b/kernel/linker.ld @@ -4,17 +4,17 @@ * Copyright (C) 2021-2022 The Vinix authors. */ +/* Tell the linker that we want an x86_64 ELF64 output file */ OUTPUT_FORMAT(elf64-x86-64) OUTPUT_ARCH(i386:x86-64) -/* Tell the linker that we want the symbol main__kmain to be our entry point */ +/* We want the symbol main__kmain to be our entry point */ ENTRY(main__kmain) /* Define the program headers we want so the bootloader gives us the right */ /* MMU permissions */ PHDRS { - null PT_NULL FLAGS(0) ; text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; rodata PT_LOAD FLAGS(1 << 2) ; data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; @@ -22,34 +22,48 @@ PHDRS SECTIONS { - /* We wanna be placed in the higher half, 2MiB above 0 in physical memory. */ + /* We wanna be placed in the topmost 2GiB of the address space, for optimisations */ + /* and because that is what the Limine spec mandates. */ + /* Any address in this region will do, but often 0xffffffff80000000 is chosen as */ + /* that is the beginning of the region. */ . = 0xffffffff80000000; .text : { *(.text .text.*) - } : text + } :text + /* Move to the next memory page for .rodata */ . += CONSTANT(MAXPAGESIZE); - /* Then let's place all the other traditional executable sections afterwards. */ .rodata : { *(.rodata .rodata.*) - } : rodata + } :rodata .symbol_table : { *(.symbol_table) - } : rodata + } :rodata + /* Move to the next memory page for .data */ . += CONSTANT(MAXPAGESIZE); .data : { *(.data .data.*) - } : data + } :data + /* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */ + /* unnecessary zeros will be written to the binary. */ + /* If you need, for example, .init_array and .fini_array, those should be placed */ + /* above this. */ .bss : { - *(COMMON) *(.bss .bss.*) - } : data + *(COMMON) + } :data KERNEL_END_SYMBOL = .; + + /* Discard .note.* and .eh_frame since they may cause issues on some hosts. */ + /DISCARD/ : { + *(.eh_frame) + *(.note .note.*) + } } diff --git a/kernel/modules/block/partition/partition.v b/kernel/modules/block/partition/partition.v index 1c68d2ad2..86825572b 100644 --- a/kernel/modules/block/partition/partition.v +++ b/kernel/modules/block/partition/partition.v @@ -110,9 +110,9 @@ fn (mut this Partition) mmap(page u64, flags int) voidptr { } pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int { - lba_buffer := memory.malloc(parent_device.stat.blksize) + lba_buffer := memory.malloc(u64(parent_device.stat.blksize)) - parent_device.read(0, lba_buffer, parent_device.stat.blksize, parent_device.stat.blksize) or { + parent_device.read(0, lba_buffer, u64(parent_device.stat.blksize), u64(parent_device.stat.blksize)) or { print('block: unable to read from device\n') return -1 } @@ -122,7 +122,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int { if gpt_hdr.identifier == partition.gpt_signature { entry_list_lba := gpt_hdr.partition_array_lba entry_cnt := gpt_hdr.partition_entry_cnt - entry_list_size := lib.align_up(sizeof(GPTPartitionEntry) * entry_cnt, parent_device.stat.blksize) + entry_list_size := lib.align_up(sizeof(GPTPartitionEntry) * entry_cnt, u64(parent_device.stat.blksize)) if gpt_hdr.partition_entry_size != sizeof(GPTPartitionEntry) { print('gpt: fatal parsing error\n') @@ -131,7 +131,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int { partition_entry_buffer := memory.malloc(entry_list_size) - parent_device.read(0, partition_entry_buffer, entry_list_lba * parent_device.stat.blksize, + parent_device.read(0, partition_entry_buffer, u64(entry_list_lba * parent_device.stat.blksize), entry_list_size) or { print('block: unable to read from device\n') return -1 @@ -148,7 +148,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int { } mut partition := &Partition{ - device_offset: partition_entry.starting_lba * parent_device.stat.blksize + device_offset: u64(partition_entry.starting_lba * parent_device.stat.blksize) sector_cnt: partition_entry.last_lba - partition_entry.starting_lba parent_device: unsafe { parent_device } } @@ -167,7 +167,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int { return 0 } - parent_device.read(0, lba_buffer, 0, parent_device.stat.blksize) or { + parent_device.read(0, lba_buffer, 0, u64(parent_device.stat.blksize)) or { print('block: unable to read from device\n') return -1 } @@ -186,7 +186,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int { partition_entry := unsafe { &MBRPartition(&partitions[i]) } mut partition := &Partition{ - device_offset: partition_entry.starting_lba * parent_device.stat.blksize + device_offset: u64(partition_entry.starting_lba * parent_device.stat.blksize) sector_cnt: partition_entry.sector_cnt parent_device: unsafe { parent_device } } diff --git a/kernel/modules/dev/ahci/ahci.v b/kernel/modules/dev/ahci/ahci.v index ce8a9c82e..fbc25e5fd 100644 --- a/kernel/modules/dev/ahci/ahci.v +++ b/kernel/modules/dev/ahci/ahci.v @@ -195,17 +195,17 @@ fn (mut dev AHCIDevice) read(handle voidptr, buffer voidptr, loc u64, count u64) start_blk := loc / dev.stat.blksize page_cnt := count / dev.stat.blksize - aligned_buffer := voidptr(u64(memory.pmm_alloc(page_cnt)) + higher_half) + aligned_buffer := voidptr(u64(memory.pmm_alloc(u64(page_cnt))) + higher_half) - if dev.rw_lba(aligned_buffer, start_blk, page_cnt, false) == -1 { + if dev.rw_lba(aligned_buffer, u64(start_blk), u64(page_cnt), false) == -1 { errno.set(errno.eio) - memory.pmm_free(aligned_buffer, page_cnt) + memory.pmm_free(aligned_buffer, u64(page_cnt)) return none } unsafe { C.memcpy(buffer, aligned_buffer, count) } - memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), page_cnt) + memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), u64(page_cnt)) return i64(count) } @@ -219,16 +219,16 @@ fn (mut dev AHCIDevice) write(handle voidptr, buffer voidptr, loc u64, count u64 start_blk := loc / dev.stat.blksize page_cnt := count / dev.stat.blksize - aligned_buffer := voidptr(u64(memory.pmm_alloc(page_cnt)) + higher_half) + aligned_buffer := voidptr(u64(memory.pmm_alloc(u64(page_cnt))) + higher_half) unsafe { C.memcpy(aligned_buffer, buffer, count) } - if dev.rw_lba(aligned_buffer, start_blk, page_cnt, true) == -1 { + if dev.rw_lba(aligned_buffer, u64(start_blk), u64(page_cnt), true) == -1 { errno.set(errno.eio) - memory.pmm_free(aligned_buffer, page_cnt) + memory.pmm_free(aligned_buffer, u64(page_cnt)) return none } - memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), page_cnt) + memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), u64(page_cnt)) return i64(count) } diff --git a/kernel/modules/dev/nvme/nvme.v b/kernel/modules/dev/nvme/nvme.v index 90c13caeb..14c0dce3c 100644 --- a/kernel/modules/dev/nvme/nvme.v +++ b/kernel/modules/dev/nvme/nvme.v @@ -356,17 +356,17 @@ fn (mut dev NVMENamespace) read(handle voidptr, buffer voidptr, loc u64, count u start_blk := loc / dev.stat.blksize page_cnt := count / dev.stat.blksize - aligned_buffer := voidptr(u64(memory.pmm_alloc(page_cnt)) + higher_half) + aligned_buffer := voidptr(u64(memory.pmm_alloc(u64(page_cnt))) + higher_half) - if dev.rw_lba(aligned_buffer, start_blk, page_cnt, false) == -1 { + if dev.rw_lba(aligned_buffer, u64(start_blk), u64(page_cnt), false) == -1 { errno.set(errno.eio) - memory.pmm_free(aligned_buffer, page_cnt) + memory.pmm_free(aligned_buffer, u64(page_cnt)) return none } unsafe { C.memcpy(buffer, aligned_buffer, count) } - memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), page_cnt) + memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), u64(page_cnt)) return i64(count) } @@ -380,16 +380,16 @@ fn (mut dev NVMENamespace) write(handle voidptr, buffer voidptr, loc u64, count start_blk := loc / dev.stat.blksize page_cnt := count / dev.stat.blksize - aligned_buffer := voidptr(u64(memory.pmm_alloc(page_cnt)) + higher_half) + aligned_buffer := voidptr(u64(memory.pmm_alloc(u64(page_cnt))) + higher_half) unsafe { C.memcpy(aligned_buffer, buffer, count) } - if dev.rw_lba(aligned_buffer, start_blk, page_cnt, true) == -1 { + if dev.rw_lba(aligned_buffer, u64(start_blk), u64(page_cnt), true) == -1 { errno.set(errno.eio) - memory.pmm_free(aligned_buffer, page_cnt) + memory.pmm_free(aligned_buffer, u64(page_cnt)) return none } - memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), page_cnt) + memory.pmm_free(voidptr(u64(aligned_buffer) - higher_half), u64(page_cnt)) return i64(count) } diff --git a/kernel/modules/errno/errno.v b/kernel/modules/errno/errno.v index 37101831d..6a8802185 100644 --- a/kernel/modules/errno/errno.v +++ b/kernel/modules/errno/errno.v @@ -8,171 +8,142 @@ import proc pub const err = u64(-1) -pub const edom = 1 - -pub const eilseq = 2 - -pub const erange = 3 - -pub const e2big = 1001 - -pub const eacces = 1002 - -pub const eaddrinuse = 1003 - -pub const eaddrnotavail = 1004 - -pub const eafnosupport = 1005 - -pub const eagain = 1006 - -pub const ealready = 1007 - -pub const ebadf = 1008 - -pub const ebadmsg = 1009 - -pub const ebusy = 1010 - -pub const ecanceled = 1011 - -pub const echild = 1012 - -pub const econnaborted = 1013 - -pub const econnrefused = 1014 - -pub const econnreset = 1015 - -pub const edeadlk = 1016 - -pub const edestaddrreq = 1017 - -pub const edquot = 1018 - -pub const eexist = 1019 - -pub const efault = 1020 - -pub const efbig = 1021 - -pub const ehostunreach = 1022 - -pub const eidrm = 1023 - -pub const einprogress = 1024 - -pub const eintr = 1025 - -pub const einval = 1026 - -pub const eio = 1027 - -pub const eisconn = 1028 - -pub const eisdir = 1029 - -pub const eloop = 1030 - -pub const emfile = 1031 - -pub const emlink = 1032 - -pub const emsgsize = 1034 - -pub const emultihop = 1035 - -pub const enametoolong = 1036 - -pub const enetdown = 1037 - -pub const enetreset = 1038 - -pub const enetunreach = 1039 - -pub const enfile = 1040 - -pub const enobufs = 1041 - -pub const enodev = 1042 - -pub const enoent = 1043 - -pub const enoexec = 1044 - -pub const enolck = 1045 - -pub const enolink = 1046 - -pub const enomem = 1047 - -pub const enomsg = 1048 - -pub const enoprotoopt = 1049 - -pub const enospc = 1050 - -pub const enosys = 1051 - -pub const enotconn = 1052 - -pub const enotdir = 1053 - -pub const enotempty = 1054 - -pub const enotrecoverable = 1055 - -pub const enotsock = 1056 - -pub const enotsup = 1057 - -pub const enotty = 1058 - -pub const enxio = 1059 - -pub const eopnotsupp = 1060 - -pub const eoverflow = 1061 - -pub const eownerdead = 1062 - -pub const eperm = 1063 - -pub const epipe = 1064 - -pub const eproto = 1065 - -pub const eprotonosupport = 1066 - -pub const eprototype = 1067 - -pub const erofs = 1068 - -pub const espipe = 1069 - -pub const esrch = 1070 - -pub const estale = 1071 - -pub const etimedout = 1072 - -pub const etxtbsy = 1073 - -pub const ewouldblock = eagain - -pub const exdev = 1075 - -pub const enodata = 1076 - -pub const etime = 1077 - -pub const enokey = 1078 - -pub const eshutdown = 1079 - -pub const ehostdown = 1080 - -pub const ebadfd = 1081 +pub const ( + eperm = 1 + enoent = 2 + esrch = 3 + eintr = 4 + eio = 5 + enxio = 6 + e2big = 7 + enoexec = 8 + ebadf = 9 + echild = 10 + eagain = 11 + enomem = 12 + eacces = 13 + efault = 14 + enotblk = 15 + ebusy = 16 + eexist = 17 + exdev = 18 + enodev = 19 + enotdir = 20 + eisdir = 21 + einval = 22 + enfile = 23 + emfile = 24 + enotty = 25 + etxtbsy = 26 + efbig = 27 + enospc = 28 + espipe = 29 + erofs = 30 + emlink = 31 + epipe = 32 + edom = 33 + erange = 34 + edeadlk = 35 + enametoolong = 36 + enolck = 37 + enosys = 38 + enotempty = 39 + eloop = 40 + ewouldblock = eagain + enomsg = 42 + eidrm = 43 + echrng = 44 + el2nsync = 45 + el3hlt = 46 + el3rst = 47 + elnrng = 48 + eunatch = 49 + enocsi = 50 + el2hlt = 51 + ebade = 52 + ebadr = 53 + exfull = 54 + enoano = 55 + ebadrqc = 56 + ebadslt = 57 + edeadlock = edeadlk + ebfont = 59 + enostr = 60 + enodata = 61 + etime = 62 + enosr = 63 + enonet = 64 + enopkg = 65 + eremote = 66 + enolink = 67 + eadv = 68 + esrmnt = 69 + ecomm = 70 + eproto = 71 + emultihop = 72 + edotdot = 73 + ebadmsg = 74 + eoverflow = 75 + enotuniq = 76 + ebadfd = 77 + eremchg = 78 + elibacc = 79 + elibbad = 80 + elibscn = 81 + elibmax = 82 + elibexec = 83 + eilseq = 84 + erestart = 85 + estrpipe = 86 + eusers = 87 + enotsock = 88 + edestaddrreq = 89 + emsgsize = 90 + eprototype = 91 + enoprotoopt = 92 + eprotonosupport = 93 + esocktnosupport = 94 + eopnotsupp = 95 + enotsup = eopnotsupp + epfnosupport = 96 + eafnosupport = 97 + eaddrinuse = 98 + eaddrnotavail = 99 + enetdown = 100 + enetunreach = 101 + enetreset = 102 + econnaborted = 103 + econnreset = 104 + enobufs = 105 + eisconn = 106 + enotconn = 107 + eshutdown = 108 + etoomanyrefs = 109 + etimedout = 110 + econnrefused = 111 + ehostdown = 112 + ehostunreach = 113 + ealready = 114 + einprogress = 115 + estale = 116 + euclean = 117 + enotnam = 118 + enavail = 119 + eisnam = 120 + eremoteio = 121 + edquot = 122 + enomedium = 123 + emediumtype = 124 + ecanceled = 125 + enokey = 126 + ekeyexpired = 127 + ekeyrevoked = 128 + ekeyrejected = 129 + eownerdead = 130 + enotrecoverable = 131 + erfkill = 132 + ehwpoison = 133 +) pub fn get() u64 { return proc.current_thread().errno diff --git a/kernel/modules/file/file.v b/kernel/modules/file/file.v index c8e7835ce..b328095d3 100644 --- a/kernel/modules/file/file.v +++ b/kernel/modules/file/file.v @@ -16,17 +16,17 @@ import memory.mmap import time pub const ( - f_dupfd = 1 - f_dupfd_cloexec = 2 - f_getfd = 3 - f_setfd = 4 - f_getfl = 5 - f_setfl = 6 - f_getlk = 7 - f_setlk = 8 - f_setlkw = 9 - f_getown = 10 - f_setown = 11 + f_dupfd = 0 + f_dupfd_cloexec = 1030 + f_getfd = 1 + f_setfd = 2 + f_getfl = 3 + f_setfl = 4 + f_getlk = 5 + f_setlk = 6 + f_setlkw = 7 + f_getown = 8 + f_setown = 9 fd_cloexec = 1 ) @@ -53,13 +53,13 @@ mut: pub const ( pollin = 0x01 - pollout = 0x02 - pollpri = 0x04 - pollhup = 0x08 - pollerr = 0x10 - pollrdhup = 0x20 - pollnval = 0x40 - pollwrnorm = 0x80 + pollout = 0x04 + pollpri = 0x02 + pollhup = 0x10 + pollerr = 0x08 + pollrdhup = 0x2000 + pollnval = 0x20 + pollwrnorm = 0x100 ) pub fn syscall_ppoll(_ voidptr, fds &PollFD, nfds u64, tmo_p &time.TimeSpec, sigmask &u64) (u64, u64) { diff --git a/kernel/modules/fs/devtmpfs.v b/kernel/modules/fs/devtmpfs.v index fe16c3972..fa3d9de76 100644 --- a/kernel/modules/fs/devtmpfs.v +++ b/kernel/modules/fs/devtmpfs.v @@ -54,7 +54,7 @@ fn (mut this DevTmpFSResource) read(handle voidptr, buf voidptr, loc u64, count mut actual_count := count if loc + count > this.stat.size { - actual_count = count - ((loc + count) - this.stat.size) + actual_count = u64(count - ((loc + count) - this.stat.size)) } unsafe { C.memcpy(buf, &this.storage[loc], actual_count) } @@ -133,7 +133,7 @@ fn (mut this DevTmpFSResource) grow(handle voidptr, new_size u64) ? { this.capacity = new_capacity this.stat.size = new_size - this.stat.blocks = lib.div_roundup(new_size, this.stat.blksize) + this.stat.blocks = lib.div_roundup(new_size, u64(this.stat.blksize)) } struct DevTmpFS {} @@ -163,7 +163,7 @@ fn (mut this DevTmpFS) mount(parent &VFSNode, name string, source &VFSNode) ?&VF } // TODO should it be maybe `mut parent`? doesn't `create_node` mutate `parent` in `unsafe`(passing it to `mut` field)? -fn (mut this DevTmpFS) create(parent &VFSNode, name string, mode int) &VFSNode { +fn (mut this DevTmpFS) create(parent &VFSNode, name string, mode u32) &VFSNode { mut new_node := create_node(this, parent, name, stat.isdir(mode)) mut new_resource := &DevTmpFSResource{ diff --git a/kernel/modules/fs/ext2/ext2.v b/kernel/modules/fs/ext2/ext2.v index eafa5ce26..54bea97af 100644 --- a/kernel/modules/fs/ext2/ext2.v +++ b/kernel/modules/fs/ext2/ext2.v @@ -291,7 +291,7 @@ fn (mut this EXT2Filesystem) symlink(parent &fs.VFSNode, dest string, target str return new_node } -fn (mut this EXT2Filesystem) create(parent &fs.VFSNode, name string, mode int) &fs.VFSNode { +fn (mut this EXT2Filesystem) create(parent &fs.VFSNode, name string, mode u32) &fs.VFSNode { mut new_node := fs.create_node(this, parent, name, stat.isdir(mode)) mut resource := &EXT2Resource { filesystem: unsafe { this } } diff --git a/kernel/modules/fs/tmpfs.v b/kernel/modules/fs/tmpfs.v index e4d3d3b34..8a8974462 100644 --- a/kernel/modules/fs/tmpfs.v +++ b/kernel/modules/fs/tmpfs.v @@ -55,7 +55,7 @@ fn (mut this TmpFSResource) read(handle voidptr, buf voidptr, loc u64, count u64 mut actual_count := count if loc + count > this.stat.size { - actual_count = count - ((loc + count) - this.stat.size) + actual_count = u64(count - ((loc + count) - this.stat.size)) } unsafe { C.memcpy(buf, &this.storage[loc], actual_count) } @@ -139,7 +139,7 @@ fn (mut this TmpFSResource) grow(handle voidptr, new_size u64) ? { this.capacity = new_capacity this.stat.size = new_size - this.stat.blocks = lib.div_roundup(new_size, this.stat.blksize) + this.stat.blocks = lib.div_roundup(new_size, u64(this.stat.blksize)) } struct TmpFS { @@ -160,7 +160,7 @@ fn (mut this TmpFS) mount(parent &VFSNode, name string, source &VFSNode) ?&VFSNo return this.create(parent, name, 0o644 | stat.ifdir) } -fn (mut this TmpFS) create(parent &VFSNode, name string, mode int) &VFSNode { +fn (mut this TmpFS) create(parent &VFSNode, name string, mode u32) &VFSNode { mut new_node := create_node(this, parent, name, stat.isdir(mode)) mut new_resource := &TmpFSResource{ diff --git a/kernel/modules/fs/vfs.v b/kernel/modules/fs/vfs.v index 8ab3d02f1..e1fa49f3f 100644 --- a/kernel/modules/fs/vfs.v +++ b/kernel/modules/fs/vfs.v @@ -13,14 +13,14 @@ import errno pub const ( at_fdcwd = -100 - at_empty_path = 1 - at_symlink_follow = 2 - at_symlink_nofollow = 4 - at_removedir = 8 - at_eaccess = 512 + at_empty_path = 0x1000 + at_symlink_follow = 0x400 + at_symlink_nofollow = 0x100 + at_removedir = 0x200 + at_eaccess = 0x200 seek_cur = 1 seek_end = 2 - seek_set = 3 + seek_set = 0 ) interface FileSystem { @@ -28,7 +28,7 @@ mut: instantiate() &FileSystem populate(&VFSNode) mount(&VFSNode, string, &VFSNode) ?&VFSNode - create(&VFSNode, string, int) &VFSNode + create(&VFSNode, string, u32) &VFSNode symlink(&VFSNode, string, string) &VFSNode link(&VFSNode, string, &VFSNode) ?&VFSNode } @@ -351,14 +351,14 @@ pub fn unlink(parent &VFSNode, name string, remove_dir bool) ? { node.resource.unref(unsafe { nil })? } -pub fn create(parent &VFSNode, name string, mode int) ?&VFSNode { +pub fn create(parent &VFSNode, name string, mode u32) ?&VFSNode { vfs_lock.acquire() ret := internal_create(parent, name, mode)? vfs_lock.release() return ret } -pub fn internal_create(parent &VFSNode, name string, mode int) ?&VFSNode { +pub fn internal_create(parent &VFSNode, name string, mode u32) ?&VFSNode { mut parent_of_tgt_node, mut target_node, basename := path2node(parent, name) if unsafe { target_node != 0 } { @@ -415,7 +415,7 @@ pub fn syscall_unlinkat(_ voidptr, dirfd int, _path charptr, flags int) (u64, u6 return 0, 0 } -pub fn syscall_mkdirat(_ voidptr, dirfd int, _path charptr, mode int) (u64, u64) { +pub fn syscall_mkdirat(_ voidptr, dirfd int, _path charptr, mode u32) (u64, u64) { mut current_thread := proc.current_thread() mut process := current_thread.process @@ -484,7 +484,7 @@ pub fn syscall_readlinkat(_ voidptr, dirfd int, _path charptr, buf voidptr, limi return to_copy, 0 } -pub fn syscall_openat(_ voidptr, dirfd int, _path charptr, flags int, mode int) (u64, u64) { +pub fn syscall_openat(_ voidptr, dirfd int, _path charptr, flags int, mode u32) (u64, u64) { mut current_thread := proc.current_thread() mut process := current_thread.process @@ -621,7 +621,7 @@ pub fn syscall_getcwd(_ voidptr, buf charptr, len u64) (u64, u64) { return 0, 0 } -pub fn syscall_faccessat(_ voidptr, dirfd int, _path charptr, mode int, flags int) (u64, u64) { +pub fn syscall_faccessat(_ voidptr, dirfd int, _path charptr, mode u32, flags int) (u64, u64) { mut current_thread := proc.current_thread() mut process := current_thread.process @@ -757,7 +757,7 @@ pub fn syscall_linkat(_ voidptr, olddirfd int, _oldpath charptr, newdirfd int, _ return 0, 0 } -pub fn syscall_fchmod(_ voidptr, fdnum int, mode int) (u64, u64) { +pub fn syscall_fchmod(_ voidptr, fdnum int, mode u32) (u64, u64) { mut current_thread := proc.current_thread() mut process := current_thread.process diff --git a/kernel/modules/initramfs/initramfs.v b/kernel/modules/initramfs/initramfs.v index 9c7df74f7..866bd4320 100644 --- a/kernel/modules/initramfs/initramfs.v +++ b/kernel/modules/initramfs/initramfs.v @@ -109,12 +109,12 @@ pub fn initialise() { name_override = unsafe { tos(voidptr(u64(current_header) + 512), int(size)) } } .directory { - fs.create(vfs_root, name, int(mode) | stat.ifdir) or { + fs.create(vfs_root, name, u32(mode | stat.ifdir)) or { panic('initramfs: failed to create directory $name') } } .regular_file { - new_node := fs.create(vfs_root, name, int(mode) | stat.ifreg) or { + new_node := fs.create(vfs_root, name, u32(mode | stat.ifreg)) or { panic('initramfs: failed to create file $name') } mut new_resource := new_node.resource diff --git a/kernel/modules/memory/mmap/mmap.v b/kernel/modules/memory/mmap/mmap.v index 2637bba4f..6e7002794 100644 --- a/kernel/modules/memory/mmap/mmap.v +++ b/kernel/modules/memory/mmap/mmap.v @@ -17,11 +17,11 @@ pub const ( prot_read = 0x01 prot_write = 0x02 prot_exec = 0x04 - map_private = 0x01 - map_shared = 0x02 - map_fixed = 0x04 - map_anon = 0x08 - map_anonymous = 0x08 + map_private = 0x02 + map_shared = 0x01 + map_fixed = 0x10 + map_anon = 0x20 + map_anonymous = 0x20 ) pub struct MmapRangeLocal { @@ -66,20 +66,16 @@ fn addr2range(pagemap &memory.Pagemap, addr u64) ?(&MmapRangeLocal, u64, u64) { return none } -pub fn delete_pagemap(_pagemap &memory.Pagemap) ? { - /* - mut pagemap := unsafe { _pagemap } - +pub fn delete_pagemap(mut pagemap memory.Pagemap) ? { pagemap.l.acquire() for ptr in pagemap.mmap_ranges { local_range := unsafe { &MmapRangeLocal(ptr) } - munmap(pagemap, voidptr(local_range.base), local_range.length) or { return none } + munmap(pagemap, voidptr(local_range.base), local_range.length) or { } } unsafe { free(pagemap) } - */ } pub fn fork_pagemap(_old_pagemap &memory.Pagemap) ?&memory.Pagemap { diff --git a/kernel/modules/resource/resource.v b/kernel/modules/resource/resource.v index 0e482782a..318dd43e2 100644 --- a/kernel/modules/resource/resource.v +++ b/kernel/modules/resource/resource.v @@ -11,24 +11,26 @@ import errno import event.eventstruct pub const ( - o_accmode = 0x0007 - o_exec = 1 - o_rdonly = 2 - o_rdwr = 3 - o_search = 4 - o_wronly = 5 - o_append = 0x0008 - o_creat = 0x0010 - o_directory = 0x0020 - o_excl = 0x0040 - o_noctty = 0x0080 - o_nofollow = 0x0100 - o_trunc = 0x0200 - o_nonblock = 0x0400 - o_dsync = 0x0800 - o_rsync = 0x1000 - o_sync = 0x2000 - o_cloexec = 0x4000 + o_path = 0o10000000 + + o_accmode = (0o03 | o_path) + o_exec = o_path + o_rdonly = 0o00 + o_rdwr = 0o02 + o_search = o_path + o_wronly = 0o01 + o_append = 0o2000 + o_creat = 0o100 + o_directory = 0o200000 + o_excl = 0o200 + o_noctty = 0o400 + o_nofollow = 0o400000 + o_trunc = 0o1000 + o_nonblock = 0o4000 + o_dsync = 0o10000 + o_rsync = 0o4010000 + o_sync = 0o4010000 + o_cloexec = 0o2000000 file_creation_flags_mask = o_creat | o_directory | o_excl | o_noctty | o_nofollow | o_trunc file_descriptor_flags_mask = o_cloexec diff --git a/kernel/modules/socket/public/public.v b/kernel/modules/socket/public/public.v index 8a47f7b9b..a91b898cf 100644 --- a/kernel/modules/socket/public/public.v +++ b/kernel/modules/socket/public/public.v @@ -7,15 +7,15 @@ module public import resource { Resource } pub const ( - af_inet = 1 - af_inet6 = 2 - af_unix = 3 - af_local = 3 - af_unspec = 4 - af_netlink = 5 - - sock_nonblock = 0x10000 - sock_cloexec = 0x20000 + af_inet = 2 + af_inet6 = 10 + af_unix = 1 + af_local = 1 + af_unspec = 0 + af_netlink = 16 + + sock_nonblock = 0o4000 + sock_cloexec = 0o2000000 ) pub interface Socket { @@ -39,9 +39,9 @@ pub mut: pub struct MsgHdr { pub mut: msg_name voidptr - msg_namelen u64 + msg_namelen u32 msg_iov &IoVec - msg_iovlen int + msg_iovlen u64 msg_control voidptr msg_controllen u64 msg_flags int diff --git a/kernel/modules/socket/unix/unix.v b/kernel/modules/socket/unix/unix.v index 27fe4dfbb..f0866bc61 100644 --- a/kernel/modules/socket/unix/unix.v +++ b/kernel/modules/socket/unix/unix.v @@ -21,7 +21,7 @@ pub const sock_buf = 0x100000 pub struct SockaddrUn { pub mut: - sun_family u32 + sun_family u16 sun_path [108]u8 } diff --git a/kernel/modules/stat/stat.v b/kernel/modules/stat/stat.v index f3a36a985..28324d6cd 100644 --- a/kernel/modules/stat/stat.v +++ b/kernel/modules/stat/stat.v @@ -18,31 +18,31 @@ pub const ( ifpipe = 0x3000 ) -pub fn isblk(mode int) bool { +pub fn isblk(mode u32) bool { return (mode & stat.ifmt) == stat.ifblk } -pub fn ischr(mode int) bool { +pub fn ischr(mode u32) bool { return (mode & stat.ifmt) == stat.ifchr } -pub fn isifo(mode int) bool { +pub fn isifo(mode u32) bool { return (mode & stat.ifmt) == stat.ififo } -pub fn isreg(mode int) bool { +pub fn isreg(mode u32) bool { return (mode & stat.ifmt) == stat.ifreg } -pub fn isdir(mode int) bool { +pub fn isdir(mode u32) bool { return (mode & stat.ifmt) == stat.ifdir } -pub fn islnk(mode int) bool { +pub fn islnk(mode u32) bool { return (mode & stat.ifmt) == stat.iflnk } -pub fn issock(mode int) bool { +pub fn issock(mode u32) bool { return (mode & stat.ifmt) == stat.ifsock } @@ -50,17 +50,19 @@ pub struct Stat { pub mut: dev u64 ino u64 - mode int - nlink int - uid int - gid int + nlink u64 + mode u32 + uid u32 + gid u32 + pad0 u32 rdev u64 - size u64 + size i64 + blksize i64 + blocks i64 atim time.TimeSpec mtim time.TimeSpec ctim time.TimeSpec - blksize u64 - blocks u64 + pad1 [3]i64 } pub const ( diff --git a/kernel/modules/termios/termios.v b/kernel/modules/termios/termios.v index 336e6b098..d1fc62239 100644 --- a/kernel/modules/termios/termios.v +++ b/kernel/modules/termios/termios.v @@ -4,53 +4,53 @@ module termios -pub const echo = 0x0001 +pub const echo = 0o0010 -pub const echoe = 0x0002 +pub const echoe = 0o0020 -pub const echok = 0x0004 +pub const echok = 0o0040 -pub const echonl = 0x0008 +pub const echonl = 0o0100 -pub const icanon = 0x0010 +pub const icanon = 0o0002 -pub const inlcr = 0x0020 +pub const inlcr = 0o0100 -pub const icrnl = 0x0002 +pub const icrnl = 0o0400 -pub const iexten = 0x0020 +pub const iexten = 0o100000 -pub const isig = 0x0040 +pub const isig = 0o0001 -pub const noflsh = 0x0080 +pub const noflsh = 0o0200 -pub const tostop = 0x0100 +pub const tostop = 0o0400 -pub const echoprt = 0x0200 +pub const echoprt = 0o2000 -pub const nccs = 11 +pub const nccs = 32 -pub const veof = 0 +pub const veof = 4 -pub const veol = 1 +pub const veol = 11 pub const verase = 2 -pub const vintr = 3 +pub const vintr = 0 -pub const vkill = 4 +pub const vkill = 3 -pub const vmin = 5 +pub const vmin = 6 -pub const vquit = 6 +pub const vquit = 1 -pub const vstart = 7 +pub const vstart = 8 -pub const vstop = 8 +pub const vstop = 9 -pub const vsusp = 9 +pub const vsusp = 10 -pub const vtime = 10 +pub const vtime = 5 pub struct Termios { pub mut: @@ -58,7 +58,8 @@ pub mut: c_oflag u32 c_cflag u32 c_lflag u32 - c_cc [nccs]u32 + c_line u8 + c_cc [nccs]u8 ibaud u32 obaud u32 } diff --git a/kernel/modules/userland/userland.v b/kernel/modules/userland/userland.v index 1b152d237..44e91d46a 100644 --- a/kernel/modules/userland/userland.v +++ b/kernel/modules/userland/userland.v @@ -21,7 +21,7 @@ import lib import strings import resource -pub const wnohang = 2 +pub const wnohang = 1 pub const sig_block = 1 @@ -492,9 +492,9 @@ pub fn syscall_exit(_ voidptr, status int) { } } - mmap.delete_pagemap(old_pagemap) or {} + mmap.delete_pagemap(mut old_pagemap) or {} - katomic.store(current_process.status, status | 0x200) + katomic.store(current_process.status, status << 8) event.trigger(mut current_process.event, false) sched.dequeue_and_die() @@ -661,7 +661,7 @@ pub fn start_program(execve bool, dir &fs.VFSNode, path string, argv []string, e kernel_pagemap.switch_to() t.process = kernel_process - mmap.delete_pagemap(old_pagemap) ? + mmap.delete_pagemap(mut old_pagemap) ? process.thread_stack_top = u64(0x70000000000) process.mmap_anon_non_fixed_base = u64(0x80000000000) diff --git a/patches/mlibc/jinx-working-patch.patch b/patches/mlibc/jinx-working-patch.patch index e8937756f..36f5f6da8 100644 --- a/patches/mlibc/jinx-working-patch.patch +++ b/patches/mlibc/jinx-working-patch.patch @@ -1392,11 +1392,11 @@ index 0000000..f421220 +} diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/access.h mlibc-workdir/sysdeps/vinix/include/abi-bits/access.h new file mode 120000 -index 0000000..171f75f +index 0000000..cb83931 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/access.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/access.h ++../../../../abis/linux/access.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/auxv.h mlibc-workdir/sysdeps/vinix/include/abi-bits/auxv.h new file mode 120000 @@ -1408,59 +1408,59 @@ index 0000000..c43f878 \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/blkcnt_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/blkcnt_t.h new file mode 120000 -index 0000000..e9d9f1b +index 0000000..0b0ec27 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/blkcnt_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/blkcnt_t.h ++../../../../abis/linux/blkcnt_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/blksize_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/blksize_t.h new file mode 120000 -index 0000000..c6dfb6e +index 0000000..7dc8d7c --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/blksize_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/blksize_t.h ++../../../../abis/linux/blksize_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/clockid_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/clockid_t.h new file mode 120000 -index 0000000..71f37bb +index 0000000..6a42da5 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/clockid_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/clockid_t.h ++../../../../abis/linux/clockid_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/dev_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/dev_t.h new file mode 120000 -index 0000000..0c1143b +index 0000000..bca881e --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/dev_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/dev_t.h ++../../../../abis/linux/dev_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/epoll.h mlibc-workdir/sysdeps/vinix/include/abi-bits/epoll.h new file mode 120000 -index 0000000..9efc3a0 +index 0000000..eb4b76d --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/epoll.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/epoll.h ++../../../../abis/linux/epoll.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/errno.h mlibc-workdir/sysdeps/vinix/include/abi-bits/errno.h new file mode 120000 -index 0000000..589859f +index 0000000..6e507de --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/errno.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/errno.h ++../../../../abis/linux/errno.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/fcntl.h mlibc-workdir/sysdeps/vinix/include/abi-bits/fcntl.h new file mode 120000 -index 0000000..ea5323a +index 0000000..463e2c9 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/fcntl.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/fcntl.h ++../../../../abis/linux/fcntl.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/fsblkcnt_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/fsblkcnt_t.h new file mode 120000 @@ -1480,35 +1480,35 @@ index 0000000..791755c \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/gid_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/gid_t.h new file mode 120000 -index 0000000..6a77218 +index 0000000..abce6d6 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/gid_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/gid_t.h ++../../../../abis/linux/gid_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/in.h mlibc-workdir/sysdeps/vinix/include/abi-bits/in.h new file mode 120000 -index 0000000..b58c683 +index 0000000..418d1d5 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/in.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/in.h ++../../../../abis/linux/in.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/ino_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/ino_t.h new file mode 120000 -index 0000000..10d644e +index 0000000..4c20aca --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/ino_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/ino_t.h ++../../../../abis/linux/ino_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/inotify.h mlibc-workdir/sysdeps/vinix/include/abi-bits/inotify.h new file mode 120000 -index 0000000..3f19ef6 +index 0000000..b5cb282 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/inotify.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/inotify.h ++../../../../abis/linux/inotify.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/ioctls.h mlibc-workdir/sysdeps/vinix/include/abi-bits/ioctls.h new file mode 120000 @@ -1520,19 +1520,19 @@ index 0000000..595106b \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/limits.h mlibc-workdir/sysdeps/vinix/include/abi-bits/limits.h new file mode 120000 -index 0000000..1aa5894 +index 0000000..6c88db2 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/limits.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/limits.h ++../../../../abis/linux/limits.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/mode_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/mode_t.h new file mode 120000 -index 0000000..29d7733 +index 0000000..5d78fdf --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/mode_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/mode_t.h ++../../../../abis/linux/mode_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/mqueue.h mlibc-workdir/sysdeps/vinix/include/abi-bits/mqueue.h new file mode 120000 @@ -1552,43 +1552,43 @@ index 0000000..f402b49 \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/nlink_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/nlink_t.h new file mode 120000 -index 0000000..7618c27 +index 0000000..bb3b625 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/nlink_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/nlink_t.h ++../../../../abis/linux/nlink_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/packet.h mlibc-workdir/sysdeps/vinix/include/abi-bits/packet.h new file mode 120000 -index 0000000..47067e2 +index 0000000..998ef1a --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/packet.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/packet.h ++../../../../abis/linux/packet.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/pid_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/pid_t.h new file mode 120000 -index 0000000..3fd26a7 +index 0000000..baa90f6 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/pid_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/pid_t.h ++../../../../abis/linux/pid_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/poll.h mlibc-workdir/sysdeps/vinix/include/abi-bits/poll.h new file mode 120000 -index 0000000..ab989c7 +index 0000000..8ea6a0a --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/poll.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/poll.h ++../../../../abis/linux/poll.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/ptrace.h mlibc-workdir/sysdeps/vinix/include/abi-bits/ptrace.h new file mode 120000 -index 0000000..f391fb7 +index 0000000..b2517b2 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/ptrace.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/ptrace.h ++../../../../abis/linux/ptrace.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/reboot.h mlibc-workdir/sysdeps/vinix/include/abi-bits/reboot.h new file mode 120000 @@ -1600,19 +1600,19 @@ index 0000000..77013a4 \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/resource.h mlibc-workdir/sysdeps/vinix/include/abi-bits/resource.h new file mode 120000 -index 0000000..3e59c75 +index 0000000..88d7402 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/resource.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/resource.h ++../../../../abis/linux/resource.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/seek-whence.h mlibc-workdir/sysdeps/vinix/include/abi-bits/seek-whence.h new file mode 120000 -index 0000000..3bd41ef +index 0000000..df7bccf --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/seek-whence.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/seek-whence.h ++../../../../abis/linux/seek-whence.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/shm.h mlibc-workdir/sysdeps/vinix/include/abi-bits/shm.h new file mode 120000 @@ -1632,11 +1632,11 @@ index 0000000..709546b \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/socket.h mlibc-workdir/sysdeps/vinix/include/abi-bits/socket.h new file mode 120000 -index 0000000..0e1d6be +index 0000000..f1dc016 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/socket.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/socket.h ++../../../../abis/linux/socket.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/socklen_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/socklen_t.h new file mode 120000 @@ -1648,11 +1648,11 @@ index 0000000..41f3b11 \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/stat.h mlibc-workdir/sysdeps/vinix/include/abi-bits/stat.h new file mode 120000 -index 0000000..82642c3 +index 0000000..1f63b41 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/stat.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/stat.h ++../../../../abis/linux/stat.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/statfs.h mlibc-workdir/sysdeps/vinix/include/abi-bits/statfs.h new file mode 120000 @@ -1680,51 +1680,51 @@ index 0000000..9ed6597 \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/termios.h mlibc-workdir/sysdeps/vinix/include/abi-bits/termios.h new file mode 120000 -index 0000000..cfcfe76 +index 0000000..ee8f0b0 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/termios.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/termios.h ++../../../../abis/linux/termios.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/time.h mlibc-workdir/sysdeps/vinix/include/abi-bits/time.h new file mode 120000 -index 0000000..97f3d52 +index 0000000..2a02625 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/time.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/time.h ++../../../../abis/linux/time.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/uid_t.h mlibc-workdir/sysdeps/vinix/include/abi-bits/uid_t.h new file mode 120000 -index 0000000..1113eba +index 0000000..b306777 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/uid_t.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/uid_t.h ++../../../../abis/linux/uid_t.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/utsname.h mlibc-workdir/sysdeps/vinix/include/abi-bits/utsname.h new file mode 120000 -index 0000000..17b993f +index 0000000..b285754 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/utsname.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/utsname.h ++../../../../abis/linux/utsname.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/vm-flags.h mlibc-workdir/sysdeps/vinix/include/abi-bits/vm-flags.h new file mode 120000 -index 0000000..f1a985e +index 0000000..bbe258c --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/vm-flags.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/vm-flags.h ++../../../../abis/linux/vm-flags.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/wait.h mlibc-workdir/sysdeps/vinix/include/abi-bits/wait.h new file mode 120000 -index 0000000..6d911c7 +index 0000000..feb2840 --- /dev/null +++ mlibc-workdir/sysdeps/vinix/include/abi-bits/wait.h @@ -0,0 +1 @@ -+../../../../abis/mlibc/wait.h ++../../../../abis/linux/wait.h \ No newline at end of file diff --git mlibc-workdir/sysdeps/vinix/include/abi-bits/xattr.h mlibc-workdir/sysdeps/vinix/include/abi-bits/xattr.h new file mode 120000