Comments (8)
This is also a problem (but easy enough to fix):
const lfs_block_t tpair[2] = {pair[0], pair[1]};
if (lfs_paircmp(oldpair, (const lfs_block_t[2]){0, 1}) == 0) {
from littlefs.
Related #39
Out of curiousity what is creating the requirement for C89?
from littlefs.
The compiler I’m using doesn’t support c99!
I completed most of the changes, I know it’s down to coding styles but some of the places you’ve used named initialisers actually creates more lines of code than not using them!
Once I’ve completed my changes, I’ll clone to the repo and copy my files over the top and go through the git changes to make sure I didn’t mess anything up.
happy to send back across, I saw somebody else having issues with c89.
i’ll Admit that on new projects I’m using a different build system, so c99 isn’t a problem and I do use it, but I think littlefs is such an important project that comparability across as many platforms is a desirable feature.
from littlefs.
I'm just curious which compiler it is.
But no, you're right (and @kgillespieatmosphere). It'd be a shame if other had to duplicate your efforts.
I'd be happy to host a c89 version, but I would prefer to treat it as a port to a different language.
If you have changes that compile in c89, feel free to create a pr. I'm thinking I'll create it's own repo and link to it from the README.
from littlefs.
Huh, after I'd finished making the last change I realised there was a compiler option to turn on c99 compatibility!
Hangs head.....
from littlefs.
Haha, well that's an easy solution.
Offer still stands to create a branch for C89 if anyone wants to create a pr for it.
from littlefs.
@geky I'm happy to close this one, I agree it's a non-issue and keeping up to date between a C89 and C99 variant would be a waste of time and effort.
from littlefs.
Thanks! Sorry there's a lot of lingering open issues. I need to go through all of them but haven't had a good chance to yet.
from littlefs.
Related Issues (20)
- corrupted dir pair error after many power losses when underlying mass memory is a SD card HOT 3
- Blocks 0 and 1 becoming corrupted whilst creating just 1 file - Problem confirmed as block count being anything other than 512. HOT 1
- Metadata can't be compacted below block_size/2 ? HOT 2
- Exposing tracking counters for wear analysis and other performance analysis (erase, write, and read block counters) HOT 1
- Feature Request: Extra programming buffer for metadata or waiting to commit the new file until closed? HOT 7
- data loss in littlefs HOT 2
- Mounting a loop device from c. HOT 1
- LittleFS not truncating previous file content when overwriting a file HOT 1
- lfs_filebd.c seems to assume errno values HOT 2
- Provide a function for probing for LFS HOT 12
- Hardfault in lfs_dir_relocatingcommit, LFS 2.9, LFS_ASSERT(pdir) with pdir null HOT 3
- renaming symbols HOT 5
- pread/pwrite HOT 6
- When are file attributes deleted or not deleted? HOT 3
- Superblock corruption HOT 28
- is it safe to open a file multiple times? HOT 4
- lfs_remove doesn't have unlink/rmdir distinction HOT 4
- When are file attributes finally written to "disk"? HOT 2
- Block count defined twice HOT 1
- What is the "bd" folder? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from littlefs.