The mapped_or_empty file implementation uses NULL to denote when an
empty directory should be in place of a non-existent file. Changing the
pointer to the output has no effect. Change the implementation data to a
NULL pointer so empty directories function properly.
The is_assigned attribute should only be true when it is assigned a
numeric ID, otherwise it will not be closed. The from_dirent operations
in the implementations of a file type do not use the calloc() function,
so the is_assigned attribute is uninitialized. Initialize it to zero so
the open file can be closed when requested.
The malloc(3p) manual page states that an implementation may choose to
return a non-NULL pointer when the size is zero. This function assumes
that there is an element in the array if the pointer is not NULL. When
the size is zero, skip the allocation and return NULL.
The qmic utility is rarely packaged in mainstream distributions, making
it inconvenient to set up a working build environment. Add generated
source files to enable compilation without qmic installed.
These variables went unused since the input buffer lengths were switched
to the sizes parsed by iobuffer.c, instead of the sizes in the primary
input argument. This makes it unnecessary at times to unpack the primary
input buffer, although the variables were being kept around to document
calling conventions. Remove the variables since they add unnecessary
warnings.
The calling conventions can still be found in the Android implementation
of FastRPC.
This interface implementation no longer opens files directly, but sends
requests to hexagonfs. Hence, fcntl.h and dirent.h are no longer needed.
Also, it uses 32-bit integers from stdint.h.
The data types for the ioctl wrapper are important, as it has variable
arguments. Document them.
Also mention terminology used in QAIC output to aid in understanding
this project in relation to existing FastRPC implementations.
The sensor configuration is not required and is normally used just to
generate the sensor registry, but the sensors do not appear unless the
directory is present. The ADSP_LIBRARY_PATH virtual environment variable
may be used when opening absolute paths as a firmware quirk, even if
nothing is read from it. To remove the requirement of empty directories
in the physical filesystem, use the new hexagonfs_mapped_or_empty_ops.
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.