Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9053 - Using Volume Labels as Mount Points

Attached to Project: Rockbox
Opened by Reinhard Enders (rhtm52) - Friday, 30 May 2008, 08:40 GMT+2
Task Type Patches
Category Operating System/Drivers
Status Unconfirmed
Assigned To No-one
Player Type Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

I'm using several SD-cards with my Sansa. When switching cards
and updating the database the db entries of other cards are lost
(unless saved to the database log).

In order to differentiate between files from different cards the
easiest way is to give them different path names. So instead of
mounting each card to <microSD1> this patch takes the volume label
i.e. 'Classic1' of the filesystem and mounts it to <Classic1>.

The database update is modified in a way that it erases only entries
for files with a filename of a mounted filesystem. So data of other
cards isn't erased.

So far the database search isn't modified to handle nonexisting files,
you still get albums etc. which are currently unavailable.
The patch only makes sure that nonexisting files aren't entered into
the current playlist.

The patch is only activated for Sansa e200, as I couldn't test it for
other players.

   volumelabel.17660.patch (8.2 KiB)
 apps/misc.h                    |    5 +++
 apps/misc.c                    |   19 +++++++++++++
 apps/playlist.c                |    4 ++
 apps/tagcache.c                |    6 +++-
 firmware/export/config-e200.h  |    2 +
 firmware/export/fat.h          |    5 +++
 firmware/common/dircache.c     |    6 ++++
 firmware/common/dir_uncached.c |   29 +++++++++++++++++++-
 firmware/drivers/fat.c         |   58 +++++++++++++++++++++++++++++++++++++++++
 9 files changed, 131 insertions(+), 3 deletions(-)

This task depends upon

Comment by Reinhard Enders (rhtm52) - Friday, 30 May 2008, 09:45 GMT+2
the following patch corrects one error
   volumelabel.17660a.patch (8.3 KiB)
 apps/misc.h                    |    5 +++
 apps/misc.c                    |   19 +++++++++++++
 apps/playlist.c                |    4 ++
 apps/tagcache.c                |    6 +++-
 firmware/export/config-e200.h  |    2 +
 firmware/export/fat.h          |    5 +++
 firmware/common/dircache.c     |    6 ++++
 firmware/common/dir_uncached.c |   31 ++++++++++++++++++++-
 firmware/drivers/fat.c         |   58 +++++++++++++++++++++++++++++++++++++++++
 9 files changed, 133 insertions(+), 3 deletions(-)

Comment by Reinhard Enders (rhtm52) - Monday, 02 June 2008, 17:11 GMT+2
Added the condition 'filename is "mounted"' to the database
code and modified tagnavi.config accordingly.
Now when swapping SD-cards the database immediately shows the
current content.
   volumelabel.17675.patch (10.9 KiB)
 apps/playlist.c                |    4 ++
 apps/tagcache.h                |    6 +++-
 apps/tagcache.c                |   30 ++++++++++++++++++---
 apps/tagtree.c                 |    4 ++
 firmware/common/dircache.c     |    6 ++++
 firmware/common/dir_uncached.c |   54 ++++++++++++++++++++++++++++++++++++--
 firmware/drivers/fat.c         |   58 +++++++++++++++++++++++++++++++++++++++++
 firmware/export/config-e200.h  |    2 +
 firmware/export/fat.h          |    5 +++
 firmware/include/dir.h         |    3 ++
 10 files changed, 164 insertions(+), 8 deletions(-)

   tagnavi.vollab.config (11.3 KiB)
Comment by Jonathan Gordon (jdgordon) - Tuesday, 03 June 2008, 12:34 GMT+2
NICE! one thing though, can it be made to always make sure the file is mounted if the path starts with "/<" instead of needing to add stuff to the tagnavi.config? I cant see any reason why you would ever want to see files which dont exist

edit: one more thing... can you change it to use the cards serial number (from the ata identify struct) to determine if its mounted instead of the volume name?
Comment by Reinhard Enders (rhtm52) - Tuesday, 03 June 2008, 18:18 GMT+2
I totally agree!
But the code is still very experimental.
As I don't know the tagtree search code, the modification seemed
to be the easiest and probably least destructive one.
If any one knows the code, it would be probably not too difficult to
add the 'mounted' test at the appropriate locations.

I took the volume name basically because I can easily modify it
and it looks nicer than numbers.
Comment by Reinhard Enders (rhtm52) - Wednesday, 04 June 2008, 13:53 GMT+2
Integrated the 'mounted' test into the search algorithm.
Now tagnavi.config doesn't need to be modified.
   volumelabel.17687.patch (12.7 KiB)
 apps/misc.h                    |    5 +++
 apps/misc.c                    |   19 +++++++++++++
 apps/playlist.c                |    4 ++
 apps/tagcache.c                |   30 ++++++++++++++++++---
 apps/tagcache.h                |    6 +++-
 apps/tagtree.c                 |   16 ++++++++++-
 firmware/common/dircache.c     |    6 ++++
 firmware/common/dir_uncached.c |   54 ++++++++++++++++++++++++++++++++++++--
 firmware/drivers/fat.c         |   58 +++++++++++++++++++++++++++++++++++++++++
 firmware/export/config-e200.h  |    2 +
 firmware/export/fat.h          |    5 +++
 firmware/include/dir.h         |    3 ++
 12 files changed, 200 insertions(+), 8 deletions(-)

Comment by Jonathan Gordon (jdgordon) - Sunday, 06 June 2010, 14:28 GMT+2
synced, but doesnt work...
   volumelabel.patch (13.5 KiB)
 apps/misc.h                            |    5 ++
 apps/playlist.c                        |    4 ++
 apps/tagcache.c                        |   30 ++++++++++++++---
 apps/tagcache.h                        |    6 ++-
 apps/misc.c                            |   19 ++++++++++
 apps/tagtree.c                         |   16 ++++++++-
 firmware/export/config.h               |    2 -
 firmware/export/config/sansaclipplus.h |    1 
 firmware/export/fat.h                  |    5 ++
 firmware/include/dir.h                 |    3 +
 firmware/common/dircache.c             |    6 +++
 firmware/common/dir_uncached.c         |    5 ++
 firmware/common/filefuncs.c            |   50 +++++++++++++++++++++++++++-
 firmware/drivers/fat.c                 |   58 ++++++++++++++++++++++++++++++++-
 14 files changed, 200 insertions(+), 10 deletions(-)

Loading...