Some directories are not required for the normal operation of the sensor
firmware, such as the sensor configuration directory. Add support for
directories that are empty if they are not present in the physical
filesystem.
The -R option specifies the root of the files served to the remote
processor (before mapping them to the virtual filesystem). The -d option
specifies the DSP variant, used to select the subdirectory storing the
libraries for the remote processor.
There are multiple printf statements for each line of the help text.
Each line can be concatenated to one string at compile-time without
impacting readability of the intended output, with the exception of the
first line, with special formatting. Join the rest of the help text into
one printf statement.
The directory that stores the files for the remote processor is
specified relative to /usr/share/qcom. This is arbitrary and confuses
the user into thinking that the path is relative to the current working
directory. Specify it as absolute.
The output of the adsp_listener interface provides the size of each
buffer in addition to the length provided to the remote method in the
primary buffer. Use the size of the buffer, which always corresponds to
the size allocated to it, regardless of whether there are consistency
checks.
The output of the adsp_listener interface provides the size of each
buffer in addition to the length provided to the remote method in the
primary buffer. Use the size of the buffer, which always corresponds to
the size allocated to it, regardless of whether there are consistency
checks.
The only named structs for parameters in the primary input and output
buffers are for the fread remote method. Move them to the the place
where they are used, consistent with the other remote method
implementations.
The file descriptor array maps file descriptors to their corresponding
file descriptions, and is in static storage. Since there is range
checking for file descriptors, there is still a benefit to having access
to the file descriptor array. Accept the array as a parameter.
In the future, this parameter can be removed in secondary functions if
needed.
The apps_std interface stores file descriptors in static variables,
opening them when needed, and configures HexagonFS with a hardcoded root
directory. Configure HexagonFS and open the file descriptors in
initialization instead.
The root directory should not be hardcoded by hexagonfs, but the user of
it. Receive the root directory entry as an argument to the function that
opens the root directory.
This interface depends on static variables to function properly. Add
code to initialize a context with the required data.
Do not use the context yet because it is not always initialized.
The reverse tunnel finds interfaces in a static variable. As a
consequence, the interfaces cannot be customized by the user of the
reverse tunnel. Move the interfaces to the user of the listener.
As an variable-length array within a struct, the procedure array is not
included in the sizeof() macro and cannot be trivially copied. Declare
it as a pointer to an array of procedures so the local fastrpc interface
definitions have a predictable size.
Some interfaces preserve their states between invocations in static
storage. This is not ideal, as interfaces cannot be initialized with
information from the user of the reverse tunnel. Add support for
interface-defined contexts.
This property should only be defined for file operations that need it.
Remove it from the common hexagonfs_fd struct and expect each file
operations to add it in the data pointer if necessary.
These functions are only referenced in the same compilation unit to
define file operations. Set these functions to static so they don't get
exported directly for no reason.
The hardware platform was checked in the above code. Check the SoC
identifier here, instead of checking the hardware platform against the
command-line SoC identifier.