9
0
Fork 0
Commit Graph

121 Commits

Author SHA1 Message Date
Sascha Hauer e77ed305e6 add missing null pointer check in unlink() 2008-03-01 21:05:23 +01:00
Carsten Schlote c1bba7e226 [general] Fixed crash in fs.h, when called with fsdrv.create == NULL
When a nor0 devices has no partitions assigned, then a call to
open() to create a file will jump with a NULL fct ptr.

Much more cheching code is missing and pointers to function are
jumped without any NULL ptr check. This must be fixed as well later.

Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
2008-02-19 09:28:17 +01:00
Marc Kleine-Budde cefc190b1b [sparse] declare functions static, use NULL as NULL pointer
this fixes:
fs/fs.c:210:6: warning: symbol 'files' was not declared. Should it be static?
fs/fs.c:212:6: warning: symbol 'get_file' was not declared. Should it be static?
fs/fs.c:227:6: warning: symbol 'put_file' was not declared. Should it be static?
fs/fs.c:248:5: warning: symbol 'dir_is_empty' was not declared. Should it be static?
fs/fs.c:613:41: warning: Using plain integer as NULL pointer

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2007-11-29 10:22:47 +01:00
sascha 3b6d6a45e7 - Implement tree structure for devices
- Use device tree structure to implement partitions
- Let devinfo print a nice tree
- Introduce 'fixed' partitions which are not removable
- Fix mount: It was not possible to mount on a relative path.
2007-10-19 08:45:57 +02:00
sascha 6b8e56295f use S_ISDIR macro in open() 2007-10-16 16:41:05 +02:00
Sascha Hauer eadf71abc7 Use Linux kernel list for drivers and devices instead of handmade
list.
2007-10-11 20:20:36 +02:00
Sascha Hauer 2443c7a6f1 export symbols 2007-10-07 14:27:24 +02:00
Sascha Hauer faf5efa138 change files and dirs to rwxrwxrwx 2007-10-04 13:15:09 +02:00
Sascha Hauer 0b19fcf491 export functions 2007-10-04 12:30:32 +02:00
Sascha Hauer e5e965b7f4 change files and directories to 0777 2007-10-03 19:57:46 +02:00
Sascha Hauer 0fb965de2c remove debug printf, replace with debug 2007-10-03 19:37:11 +02:00
Sascha Hauer b3dc734018 declare lots of functions static 2007-09-28 10:07:26 +02:00
Sascha Hauer 79ed00ba92 pass file size from read_file 2007-09-27 16:33:35 +02:00
Sascha Hauer 2d02f7c0f0 fix bug in ramfs when creating files whose parents do not exist 2007-09-27 11:58:22 +02:00
Sascha Hauer 6ed4c53c21 handle NULL Pointers in readdir/closedir properly 2007-09-25 14:36:55 +02:00
Sascha Hauer f132b2e073 - change function declarations for better standard conformity:
int open(const char *pathname, int flags);
-> int open(const char *pathname, int flags, ...);
   int mkdir(const char *pathname);
-> int mkdir(const char *pathname, mode_t mode);
2007-09-24 17:03:20 +02:00
Sascha Hauer 4d17340dc1 remove unused includes 2007-09-21 21:30:25 +02:00
Sascha Hauer 9a365ade16 remove uncompilable filesystems 2007-09-21 14:02:08 +02:00
Sascha Hauer 056a695c15 implement flash protection 2007-07-16 10:29:28 +02:00
Sascha Hauer 665291e693 implement memmap().
With this function we can get a pointer to directly memory mapped
devices like nor flash or RAM. Useful for bootm where we save one
memcopy when the image is mappable
2007-07-15 13:50:04 +02:00
Sascha Hauer 11534fdfa2 implement truncate for devfs 2007-07-05 21:46:42 +02:00
Sascha Hauer 75a10b942c svn_rev_706
add file headers
2007-07-05 18:02:19 +02:00
Sascha Hauer b2c5310d4d svn_rev_653
restructure tree, add reginfo command
2007-07-05 18:02:14 +02:00
Sascha Hauer 3fd64b7c45 svn_rev_633
add some comments, minor cleanups
2007-07-05 18:02:12 +02:00
Sascha Hauer e2f1a28306 svn_rev_605
make read_file global
2007-07-05 18:02:09 +02:00
Sascha Hauer edc878b37e svn_rev_566
fs support is not optional
2007-07-05 18:02:05 +02:00
Sascha Hauer e390c672eb svn_rev_544
make fs menuconfig
2007-07-05 18:02:03 +02:00
Sascha Hauer a4b07792b9 svn_rev_465
make fs support mandatory
2007-07-05 18:01:56 +02:00
Sascha Hauer 44635dd22e svn_rev_452
add erase function
2007-07-05 18:01:55 +02:00
Sascha Hauer 0dc645fba6 svn_rev_448
add erase
2007-07-05 18:01:54 +02:00
Sascha Hauer 0eaabc8439 svn_rev_438 2007-07-05 18:01:54 +02:00
Sascha Hauer 0396fe8021 svn_rev_437
use dev_read/dev_write
2007-07-05 18:01:53 +02:00
Sascha Hauer e694adc6a4 svn_rev_420
- do more POSIX:
  - use DIR instead of struct dirent
  - use (struct dirent)->d_name instead of (struct dirent)->name
- switch to a new layout for U_BOOT_CMD:
  - use C99 initializers to be able to add more fields to the
    command struct
  - add aliases for commands (needed mainly for help -> ? and test -> [
  - This is not done for all commands yet, but the compiler will tell you ;)
2007-07-05 18:01:52 +02:00
Sascha Hauer 014678f7a0 svn_rev_406
let normalise path allocate the string instead of changing the original one
2007-07-05 18:01:51 +02:00
Sascha Hauer 5b4110a39c svn_rev_396
fix truncate (again). This still looks ugly
2007-07-05 18:01:50 +02:00
Sascha Hauer 31fc4bbff6 svn_rev_379 2007-07-05 18:01:48 +02:00
Sascha Hauer d7e3f8d227 svn_rev_378
fix truncate
2007-07-05 18:01:48 +02:00
Sascha Hauer 8ab8512461 svn_rev_372 2007-07-05 18:01:48 +02:00
Sascha Hauer 8287d7f588 svn_rev_371
fix mem hole
2007-07-05 18:01:48 +02:00
Sascha Hauer 46743ea28f svn_rev_369
include asm-generic in errno.h instead of all other files
2007-07-05 18:01:47 +02:00
Sascha Hauer 46d7dcc9ad svn_rev_364
- fix free corruption in open
- simplify mount()
- fix mem hole
2007-07-05 18:01:47 +02:00
Sascha Hauer e0cf91dbc4 svn_rev_339 2007-07-05 18:01:44 +02:00
Sascha Hauer 9df483a88f svn_rev_338
add rmdir and unlink, make creat more like posix, add common function for prerequites checking
2007-07-05 18:01:44 +02:00
Sascha Hauer 96b3a92454 svn_rev_337 2007-07-05 18:01:44 +02:00
Sascha Hauer 132c9b968d svn_rev_325
implement . and .. entries
2007-07-05 18:01:43 +02:00
Sascha Hauer 57013a9864 svn_rev_324
use xzalloc instead of malloc/memset
2007-07-05 18:01:43 +02:00
Sascha Hauer 5a82f54e59 svn_rev_301 2007-07-05 18:01:41 +02:00
Sascha Hauer d5f7b1f985 svn_rev_288
remove handling of / in stat function. We will never be called with / here
2007-07-05 18:01:40 +02:00
Sascha Hauer 700983e486 svn_rev_287
add lseek implementation, remove special handling of /dev/ (is now implemented as devfs)
2007-07-05 18:01:40 +02:00
Sascha Hauer 17fda95040 svn_rev_286 2007-07-05 18:01:40 +02:00