n_open: rework so we operate directly from user memory
authorAlan Cox <alan@linux.intel.com>
Sat, 10 Feb 2018 19:58:42 +0000 (19:58 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 10 Feb 2018 19:58:42 +0000 (19:58 +0000)
commitc5b7d15233ca37088772e91cf98001ede5cb4934
tree3eb45c5b6ba9e67459157867f34544d761cb71dd
parente8903bb1640bb783c555611051bb521aff6667b0
n_open: rework so we operate directly from user memory

In addition adjust the logic so we build a correctly parsed last name component
in lastname so that it can be used by the caller to manipulate directories.

This gets rid of filename() which saves us copying and parsing the path twice
as well as getting rid of that code
It gets rid of most of the 30 byte name arrays (rename still has to have one)
It allows us to get rid of ugets()
Our PATH_MAX can now be arbitrarily set (for now still 512)
ugets/_ugets/__ugets all go away
pathbuf for LEVEL2 goes away, LEVEL0 and 1 and 2 now all look the same

The end result on Z80 at least is that we run faster amd we save a whopping 400
bytes.
24 files changed:
Kernel/filesys.c
Kernel/include/kernel.h
Kernel/include/level2.h
Kernel/platform-68hc11test/p68hc11.s
Kernel/platform-coco2cart/usermem.s
Kernel/platform-coco3/main.c
Kernel/platform-coco3/usermem_gime.s
Kernel/platform-dragon-nx32/usermem_sam.s
Kernel/platform-dragon/usermem_sam.s
Kernel/platform-multicomp09/usermem_gime.s
Kernel/platform-socz80/usermem.s
Kernel/platform-ubee/devhd.c
Kernel/platform-v65c816-big/main.c
Kernel/platform-z80pack/main.c
Kernel/syscall_exec16.c
Kernel/syscall_fs.c
Kernel/syscall_fs2.c
Kernel/syscall_fs3.c
Kernel/syscall_other.c
Kernel/usermem.c
Kernel/usermem_std-6502.s
Kernel/usermem_std-65c816.s
Kernel/usermem_std-z80-banked.s
Kernel/usermem_std-z80.s