You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Unlike other OSAL resources, the File System related calls (OS_mount/unmount/mkfs/rmfs/initfs etc) identify the target by string rather than as a numeric ID.
Aside from being inconsistent, this is also ambiguous and confusing because the are actually 4 different possible strings use here:
Device name (e.g. "/ramdev0")
Volume name (e.g. "RAM")
System Mount point (e.g. "/dev/shm/osal:RAM")
Virtual Mount point (e.g. "/ram")
Furthermore not all functions use the same name. When implementing OS_FileSysStatVolume I noticed that the old OS_fs(Bytes|Blocks)Free() and OS_chkfs use virtual mount point (4), while the others use device name (1). The OS_FS_GetPhysDriveName() actually returns the system mount point (3) not the actual device (1) that other calls require.
Describe the solution you'd like
Ideally, change these APIs to work with IDs rather than names because IDs are not ambiguous. One can also find/lookup an ID based on any of the names (lookup functions don't all currently exist but easy to add).
Describe alternatives you've considered
If API changes are not possible at this stage, then then we should at least be consistent and choose one name to use. Probably the device name (1) should be the one, as it seems the one used by most calls currently.
Additional context
The fact that OS_chkfs() uses a virtual mount point should probably be considered a bug, as it implies the file system is already mounted at the time the call is done. Most OS's do not permit a file system check of a mounted device.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Unlike other OSAL resources, the File System related calls (OS_mount/unmount/mkfs/rmfs/initfs etc) identify the target by string rather than as a numeric ID.
Aside from being inconsistent, this is also ambiguous and confusing because the are actually 4 different possible strings use here:
Furthermore not all functions use the same name. When implementing OS_FileSysStatVolume I noticed that the old OS_fs(Bytes|Blocks)Free() and OS_chkfs use virtual mount point (4), while the others use device name (1). The OS_FS_GetPhysDriveName() actually returns the system mount point (3) not the actual device (1) that other calls require.
Describe the solution you'd like
Ideally, change these APIs to work with IDs rather than names because IDs are not ambiguous. One can also find/lookup an ID based on any of the names (lookup functions don't all currently exist but easy to add).
Describe alternatives you've considered
If API changes are not possible at this stage, then then we should at least be consistent and choose one name to use. Probably the device name (1) should be the one, as it seems the one used by most calls currently.
Additional context
The fact that
OS_chkfs()
uses a virtual mount point should probably be considered a bug, as it implies the file system is already mounted at the time the call is done. Most OS's do not permit a file system check of a mounted device.Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: