Commit Graph

22 Commits

Author SHA1 Message Date
Vincent Ollivier d22c504726
Improve system information (#553)
* Add socket command to manual

* Update syscall doc

* Update copyright year in help command

* Fix lisp include

* Fix error styling in shell

* Use uppercase hex

* Update website

* Move some CSI color positions

* Update line-height
2023-12-01 16:51:02 +01:00
Vincent Ollivier 314118c35f
Update smoltcp from 0.9.1 to 0.10.0 (#510)
* Upgrade smoltcp from 0.9.1 to 0.10.0

* Rename timestamp to time

* Update changelog
2023-06-28 21:45:40 +02:00
Vincent Ollivier fe378dd07f
Upgrade smoltcp from 0.8.2 to 0.9.1 (#484)
* Upgrade smoltcp from 0.8.2 to 0.9.1

* Disable httpd

* Add fence before shell command

* Remove fix for failing test

* Refactor code

* Update changelog
2023-05-08 11:11:13 +02:00
Vincent Ollivier 7665c11a9a
Fix RTL8139 driver issues (#483)
* Fix typo in rx buffer size

* Fix issue with small packets tx

* Change tx buffer len

* Fix tx ring overflow

* Use 1024 bytes for max DMA burst size

* Use spin_loop

* Add atomic fence before polling for status change

* Disable interrupts

* Update device capabilities

* Fix http service

* Update /var/www

* Refactor buf len

* Update changelog
2023-05-05 23:14:42 +02:00
Vincent Ollivier 39fe99216f
Run clippy (#438) 2022-11-09 23:29:56 +01:00
Vincent Ollivier f7f1bd85f1
Run clippy (#424) 2022-10-28 09:56:04 +02:00
Vincent Ollivier 7e3c0da53c
Add support for closing connections in request to HTTP server (#406)
* Parse request header

* Add Request#is_persistent

* Close connection when requested
2022-09-04 15:38:10 +02:00
Vincent Ollivier 7f3baa2c60
Switch HTTP server to HTTP 1.1 (#395)
* Switch to connection keep-alive

* Upgrade to HTTP 1.1

* Add pcap to makefile
2022-08-27 12:36:20 +02:00
Vincent Ollivier f1a19e2055
Improve HTTP server (#391)
* Link host 8080 port to qemu 80

* Add root dir

* Add support for images

* Add Response struct

* Refactor response buffer creation

* Add index file support

* Copy www dir

* Update trailing slash rule

* Add command line arguments

* Remove strftime function

* Add read only mode

* Implement Display

* Add colored output

* Add Request struct

* Add common date time format

* Add time::now_utc

* Add connexions pool

* Reduce wait time

* Add install --yes

* Fix typo

* Add more mime types
2022-08-25 08:42:35 +02:00
Vincent Ollivier e4ce2ab59c
Use exit code to set status var (#360)
* Use exit code

* Add macro_use to sys module

* Replace ExitCode with Result<usize, usize>

* Add status var

* Fix status code

* Replace status with ?

* Fix regex for var substitution

* Remove warnings

* Add temporary fix for failing tests

* Add q shortcut to calc

* Use usize for exit code

* Use process exit codes

* Reintroduce ExitCode enum

* Use ExitCode::UsageError where needed

* Display usage error in find command

* Add doc
2022-06-29 19:23:01 +02:00
Vincent Ollivier 28759df00c
Replace clock syscalls with device files (#345)
* Replace clock syscalls with device files

* Add missing newline to read

* Update time command
2022-06-05 13:58:05 +02:00
Vincent Ollivier 530658221d
Add socket command (#341)
* Add socket command

* Add test.html page

* Refactory sending code

* Update documentation

* Fix newlines

* Add interval option

* Replace newlines

* Exit on end of transmission

* Add listen mode

* Fix arguments parsing

* Remove debug output
2022-05-21 10:46:16 +02:00
Vincent Ollivier 946ea95ff0
Refactor network commands (#322)
* Change debug color

* Rewrite net command

* Update doc

* Add dhcp --verbose

* Remove ip and route commands

* Align command outputs

* Adjust colors

* Use system dns if available with host command

* Add error macro

* Display network error

* Use error macro

* Fix broken test

* Update dir listing color

* Update syscall doc

* Use error macro in more commands
2022-04-10 09:27:12 +02:00
Vincent Ollivier 3bef35b707
Upgrade smoltcp (#293)
* Upgrade smoltcp

* Fix issues

* Add back net monitor

* Update doc

* Fix net command help
2022-04-05 13:03:55 +02:00
Vincent Ollivier 9708796976
Add directory support to userspace (#303)
* Create dirs from userspace

* Add delete syscall

* Add name to FileStat

* Add offset to Dir

* Add dynamic size to dir

* Add FileStat (de)serializer

* Add ReadDir#block_index

* Add FileStat::root

* Implement FileIO#read for Dir

* Add api::fs::read_dir

* Use read_dir for list command

* Allow read /path/to/dir/ commands

* Save dir size to dir entry

* Fix return value of api::fs::create_device

* Read dir from userspace

* Add proc command

* Close file handle when creating dir

* Add /dev/null

* Remove path restriction

* Allow listing of singular file

* Update doc

* Re-export fs struc in API

* Use read_dir in shell autocomplete

* Use fs::delete in httpd

* Rename stat to info

* Update doc

* Rename attributes
2022-01-18 08:44:10 +01:00
Vincent Ollivier d053f17124
Add shell redirections (#262)
* Reorder syscalls

* Add DUP syscall

* Add api::fs::reopen

* Add shell redirections

* Use regex to parse arrow

* Add tests

* Refactor install

* Add eprint macro

* Change exit code of empty command in shell

* Update changelog
2021-11-05 09:06:40 +01:00
Vincent Ollivier 43ac7cdc8c
Add file syscalls (#242)
* Add file syscalls

* Change syscalls return type

* Add stat syscall

* Add file creation

* Use api::fs::read_to_string in more user programs

* Use syscalls in fs api

* Move some functions from sys::fs to api::fs

* Add FileIO for generic read and write

* Write to stdout

* Add stdout test

* Disable output

* Move FileIO to API

* Add io::stdin and io::stdout to API

* Add a real /dev/random

* Fix test

* Add missing device file

* Refactor stdin read

* Truncate read_line result if larger than buf

* Use fs::read and fs::write to copy files

* Use fs::read for user password database

* Use fs::read for vga command

* Use api::syscall::stat instead of sys::fs::File::open

* Use fs::read and fs::write in httpd

* Add RNG to API

* Add fs::open_dir and fs::create_dir

* Add fs::exists
2021-09-15 22:27:32 +02:00
Vincent Ollivier 5e115ced6c
Fix clippy warnings (#214)
* Fix slow zero-filled vector initialization

* Fix warnings in user command

* Fix clippy error in httpd command

* Fix warnings about using print instead println

* Fix length comparison to zero

* Fix some clippy warnings

* Fix length comparison to zero

* Fix some clippy warnings

* Fix some clippy warnings

* Fix bug introduced by clippy
2021-07-25 12:41:44 +02:00
Vincent Ollivier 8af428beab
Add Lisp interpreter (#207)
* Add lisp interpreter

* Refactor lisp code

* Add copyright notice

* Add multiplication

* Shorten type names

* Remove print import

* Add tests

* Add tests for def and fn

* Add print builtin

* Add file eval

* Add fib.ls

* Use define and lambda instead of def and fn

* Rewrite the primitive operators

* Update fibonacci example

* Add syntactic sugar for quote

* Rename console::abort to console::end_of_text

* Add console::end_of_transmission

* Remove auto parenthesis

* Fix parsing quotes

* Refactor quote primitive

* Add empty list comparison to eq primitive

* Add defun primitive

* Rename example

* Fix install path

* Add doc

* Add eq? and atom? aliases
2021-07-21 09:40:40 +02:00
Vincent Ollivier 6826a9701d
Refactor print macros (#208) 2021-07-17 20:58:04 +02:00
Vincent Ollivier 0b06084dec
Add file offset (#206) 2021-07-17 20:48:01 +02:00
Vincent Ollivier 6b8de261ca
Move kernel code to api (#204)
* Move code to api

* Add palette::from_csv

* Refactor palette::from_str with tests

* Add tests to api::font::from_bytes

* Add TODO comments to fs code

* Rename kernel and user dirs to sys and usr

* Add missing files from migration

* Move console::Style to api

* Add more missing changes
2021-07-16 10:19:18 +02:00