9
0
Fork 0
Commit Graph

36 Commits

Author SHA1 Message Date
Sascha Hauer 3a92711511 fs: get fs device using container_of
This reduces the usage of dev->type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 14:03:56 +01:00
Sascha Hauer 76c7f90a54 fs: get fs driver using container_of
This reduces the usage of dev->type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 14:03:56 +01:00
Sascha Hauer 9bf08d582a fs: put fs devices on its own bus
By putting the fs devices/drivers on a bus on its own we can hook
into the bus remove function to cleanup the fs device. This way
we can unmount a device by simply unregistering the device which
is useful for for example USB mass storage devices. These can now
unregister the assoiated filesystems by unregistering their child
devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 33b5ead7e6 fs: remove fs devices list
We store the fs devices in a list only because we want to
check if the fs driver needs a backingstore or not. The
driver will bail out anyway if it needs a backingstore and
doesn't find one. So we can remove this check and thus remove
the list of fs devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer fcec314b09 fs: remove unused function fsdev_get_mountpoint
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer ec1d29e61c fs: Store mtab path in allocated string
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 2c2fb6a947 fs: make locally used function get_mtab_entry_by_path static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 8a81eab846 fs: Store mtab entries in list
To make the code a bit easier to read. Also, do not allow
to umount / when something else is mounted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer f1bb89fd9e fs: implement flush function
Once we have caching in file functions we need a way to sync
the the underlying devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:07 +02:00
Sascha Hauer 5c44e3af24 fs: remove unused field 'type' from struct fs_driver_d
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:07 +02:00
Sascha Hauer 2baeaf38f3 fs: replace broken dev_protect with protect_file function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-02 15:23:22 +02:00
Sascha Hauer 02ba8a0542 get rid of device ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:47 +02:00
Sascha Hauer 6459b135d9 Get rid of DEVICE_TYPE_FS usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +02:00
Sascha Hauer ee6d36a540 - introduce ioctl call
- pass open/close/lseek through to drivers
2008-06-06 09:30:48 +02:00
Sascha Hauer ce172e152e add ls -c and -l 2008-03-11 21:41:56 +01:00
Sascha Hauer a1a747af7f fix typo 2008-03-01 21:06:14 +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 Hauer 79ed00ba92 pass file size from read_file 2007-09-27 16:33:35 +02:00
Sascha Hauer 46d5705395 implement mkdir -p 2007-09-27 11:59:18 +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 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 a46f705cd9 svn_rev_634
add comments
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 5a6358dcd0 svn_rev_453
add erase function
2007-07-05 18:01:55 +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 ca69a14849 svn_rev_368
let mount take the device as string
2007-07-05 18:01:47 +02:00
Sascha Hauer 07dbdaef61 svn_rev_331
add rmdir and unlink
2007-07-05 18:01:44 +02:00
Sascha Hauer 27f9ff5ab4 svn_rev_290
add lseek
2007-07-05 18:01:40 +02:00
Sascha Hauer 9b4dfd7995 svn_rev_272
more FS work
2007-07-05 18:01:38 +02:00
Sascha Hauer 112ada667b svn_rev_270
WIP FS support
2007-07-05 18:01:38 +02:00
Sascha Hauer cf7a56fc78 svn_rev_268
WIP
2007-07-05 18:01:38 +02:00
Sascha Hauer 9db8ed3312 svn_rev_261
WIP Filesystem support
2007-07-05 18:01:37 +02:00
Sascha Hauer 3f8a5b17f2 svn_rev_259
WIP
2007-07-05 18:01:37 +02:00
Sascha Hauer 7880ba6372 svn_rev_235
beginning filesystem support
2007-07-05 18:01:35 +02:00