# FS2 no space left - errno 28 ???

**URL:** <https://forums.digi.com/t/fs2-no-space-left-errno-28/10138>\
**Category:** Rabbit\
**Created:** [July 30, 2008, 4:09pm UTC](https://forums.digi.com/t/fs2-no-space-left-errno-28/10138 "2008-07-30T16:09:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbasberg](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dbasberg](https://forums.digi.com/u/dbasberg)\
**Post date:** [July 30, 2008, 4:09pm UTC](https://forums.digi.com/t/fs2-no-space-left-errno-28/10138/1 "2008-07-30T16:09:59Z")

</div>

If anyone can steer me to any info on my problem, I would greatly appreciate it. I am doing a system with UCOSII with 5 tasks. From the lowest priority task I attempt to save a large struct (0x2700 - 9984 bytes) to an fs2 file. I expect to save one for each day of the week. So, 7 files of 9,984 bytes each. Before the fwrite, I do an fclose, fdelete, and fcreate to make sure the file number is free. Then fwrite returns errno = 28 😕. In memconfig.lib, I have XMEM\_RESERVE\_SIZE 0x15000L. In the program I set FS\_MAX\_FILES 16, FS\_USE\_PROGRAM\_FLASH 85, MY\_LS\_SHIFT 8 (256 byte sectors), & LX\_2\_USE fs\_get\_flash\_lx(). The power on (in main) does err = fs\_init(0,0);  
This is a shotgun of info, I can answer any question as requested. I hope to maintain values in the fs2 files through a reset, if possible. There is a fixed ID in each file that can be tested for sanity to keep files through a powerup. But that is for later development after I get past errno = 28.

The struct address in data section is 0x9015. Can I save a struct??  
rc = fwrite(&fh[day], vp\_Log, sizeof(Log)); yields rc=0, errno =28

Any help would be greatly appreciated. I am quite willing to work for my answer, if you can point me to material to read.

Thanks, Doug
