Commit Graph

65 Commits

Author SHA1 Message Date
Travis Geiselbrecht
6cb02526b7 [include][console] split lib/console.h into two
TL;DR most uses of lib/console.h -> lk/console_cmd.h

Move the part that lets a piece of code somewhere in the system to
define a console command from the actual lib/console api to start an
instance of the console. Move in almost every place the user of the
console command definition to the new header, lk/console_cmd.h which is
always in the include path.

Also remove most uses of testing for WITH_LIB_CONSOLE since you can
almost always just safely define it and then let the linker remove it.
2019-07-13 16:56:33 -07:00
Travis Geiselbrecht
3aecdda231 [includes] replace header guards with #pragma once 2019-07-13 15:46:16 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Travis Geiselbrecht
75b312b30b [lib][fs][spifs] abort cleanly on mount if device is null 2019-06-10 17:10:42 -07:00
Travis Geiselbrecht
f98cef7992 [warnings] fix warnings across the entire code base
Fix or squelch all warnings in all code covered by buildall.
2018-12-16 17:33:22 -08:00
Travis Geiselbrecht
7bbf6d5831 [nit] fix extraneous trailing ; in CDECLS lines 2018-12-16 16:49:40 -08:00
Travis Geiselbrecht
5dea3e1933 [warnings] fix a few warnings introduced with newer version of gcc
Most of the warnings are new, such as needing to mark fallthroughs on
cases explicitly. A few are based on signed vs unsigned comparisons.

Disable one warning that was annoying about comparing null to arguments
marked nonnull.
2018-03-15 14:10:12 -07:00
klemens
d0b90c2d68 [spelling] spelling-fixes. (not external/) 2016-08-25 17:30:34 -07:00
Søren Gjesse
6faa2957e1 [spifs] Fix warning with GCC 5.3.1
With GCC 5.3.1 (5-2016-q2-update from https://launchpad.net/gcc-arm-embedded)
additional warnings about unused variables cause compilation to fail.
2016-05-31 12:19:57 -07:00
Gurjant Kalsi
c19fcc5bb3 [spifs] Implement the ioctl to test whether or not the device is memory mapped. 2016-05-10 18:23:11 -07:00
Gurjant Kalsi
a63938a8c8 [fs] Add an ioctl to test if a file is memory mapped. 2016-05-10 18:22:44 -07:00
Gurjant Kalsi
44e74f0486 [dartuino][bootloader] Merge bootloader branch into master. 2016-03-28 12:05:20 -07:00
Travis Geiselbrecht
87bbe81050 [fs][fat] run astyle over the newly imported code to match LK style 2016-03-25 21:36:15 -07:00
Travis Geiselbrecht
4daede9164 [fs][fat] fail gracefully if the bdev passed in is null 2016-03-25 21:36:15 -07:00
Steve White
4263f92843 [fs][fat32] Adapt modern LK conventions 2016-03-24 14:15:20 -07:00
Steve White
97d1121f09 Merge branch 'master' into fatfs 2016-03-24 13:39:19 -07:00
Steve White
5260d3d5f2 read only fat32 driver with long filename support. 2016-03-23 13:07:59 -07:00
Gurjant Kalsi
9ab4f51913 [dartuino][bootloader] Create a project for the bootloader. 2016-03-09 15:20:05 -08:00
Gurjant Kalsi
66b9d98a0e [fs][memfs] Add truncate functionality to memfs. 2016-03-02 10:47:55 -08:00
Gurjant Kalsi
f2dfd006c6 [fs][spifs] Add truncate functionality to spifs. 2016-03-02 10:47:50 -08:00
Gurjant Kalsi
61b4f0450e [fs] Add a truncate file API to the FS api layer 2016-03-02 10:40:09 -08:00
Gurjant Kalsi
dd3468fab2 [spifs][benchmark][debug] Add a benchmark to test spifs performance. 2016-03-02 00:45:58 -08:00
Travis Geiselbrecht
2eb32a4369 [style] mass reformat all the non external code to 4 space indents
Ran everything through scripts/codestyle.space, which uses astyle
to generally follow K&R style.

Biggest non whitespace change is pulling brackets down on function
declarations, which I'm pretty ambivalent about, but astyle insists
on taking a stance
2016-02-14 12:24:01 -08:00
Gurjant Kalsi
a6e3aeff12 [fs][spifs][qspi] Reduce stack usage by 12% of the total default stack size for some critical call paths through the spifs filesystem layer. 2016-02-07 11:28:39 -08:00
Gurjant Kalsi
177a43b0b1 [dartuino][spifs] Remove target specific fsconfig header.
fsconfig header didn't really make sense since not every target
implements it.
2016-02-01 18:00:53 -08:00
Gurjant Kalsi
182d574248 [fs][cdecls] Wrap FS API with cdelcs 2016-01-29 17:32:52 -08:00
Gurjant Kalsi
fd223ac633 [spifs] Module deps accidentally listed under module srcs. 2015-12-16 16:49:48 -08:00
Gurjant Kalsi
18200dd101 [fs][spifs] ioctl for getting memmap addr of a file 2015-12-11 17:01:04 -08:00
Travis Geiselbrecht
4ab14424bd [cppcheck] clean up a few suggestions from cppcheck 2015-11-24 15:08:38 -08:00
Gurjant Kalsi
3ef46ccf8c [spifs][fs] Bump dirents when files that they point to are deleted. 2015-11-16 18:02:13 -08:00
Gurjant Kalsi
e98e1657f4 [spifs][fs] Trivial changes from previous PR comments. 2015-11-14 18:21:22 -08:00
Gurjant Kalsi
e5edfcd3c2 [fs][spifs][test] Added two more tests to test more codepaths. 2015-11-12 15:54:59 -08:00
Gurjant Kalsi
c8e33b84cd [spifs] Small stylistic changes. 2015-11-12 13:15:42 -08:00
Gurjant Kalsi
f160220af4 [fs][spifs] Perform a consistency check when mounting the fs. 2015-11-12 11:06:05 -08:00
Gurjant Kalsi
e66ac02ee0 [fs] Reduce file path buffer size to preserve the stack. 2015-11-12 10:56:54 -08:00
Gurjant Kalsi
e9ee76ef13 [fs][spifs][cosmetic] Codestyled the new spifs related files. 2015-11-10 21:08:22 -08:00
Gurjant Kalsi
202ebfcee7 [fs][spifs][test] Add unit tests for the spifs implementation. 2015-11-10 21:05:07 -08:00
Gurjant Kalsi
08ad97fe15 [fs][spifs] Added a capacity field to file stat 2015-11-10 20:48:54 -08:00
Gurjant Kalsi
689e3eba2d [fs][spifs] spifs_write returns number of bytes written on success rather than NO_ERROR 2015-11-10 20:06:28 -08:00
Gurjant Kalsi
b96ef7b13b [fs][spifs] Add an FS stat method to the FS api. 2015-11-10 20:02:44 -08:00
Gurjant Kalsi
45e67822c0 [fs][shell] Allocate shell path buffers on the heap to avoid stack overruns 2015-11-10 12:38:20 -08:00
Gurjant Kalsi
ccbde6a385 [spifs][fs] Create and enable an FS format hook. 2015-11-10 11:28:02 -08:00
Gurjant Kalsi
47cff1cfe2 [fs][flash] Filesystem for spiflash. 2015-11-09 14:32:46 -08:00
Travis Geiselbrecht
491e47fbc6 [linker] align special sections on native pointer bounary
This fixes a bug in x86-64 where it was trying to default align
input sections on 16 byte boundaries, which was screwing up the
padding between structures.
2015-11-06 12:00:04 -08:00
Travis Geiselbrecht
5be1bbeb4c [lib][fs] add a bunch of standard fs shell commands
cd, ls, mkdir, rmdir, etc

Also added a cheezy, global current working dir to make the commands a bit nicer.
2015-10-28 20:06:09 -07:00
Travis Geiselbrecht
15b6344b85 [lib][fs] add file remove 2015-10-28 20:06:09 -07:00
Travis Geiselbrecht
badf063158 [lib][fs] use the new linker script magic to register fs implementations 2015-10-27 12:44:49 -07:00
Travis Geiselbrecht
ae943de3b0 [lib][fs] add directory open/read/close api, wire up support in memfs 2015-10-27 12:44:49 -07:00