ANDROID: firmware_loader: Emit empty string when no custom paths
firmware_param_path_get will return -1 if no custom firmware paths have
been set. Use sysfs_emit_at to form the response string and now emit an
empty string as expected when there are no custom firmware paths.
Fixes: ce17e299d0 ("ANDROID: firmware_loader: Add support for customer firmware paths")
Change-Id: If695733c81b3cef105c28dff7a6c1b6e722b2169
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
This commit is contained in:
parent
bc7370e205
commit
e4c0c0c443
1 changed files with 3 additions and 6 deletions
|
|
@ -525,14 +525,11 @@ static int firmware_param_path_get(char *buffer, const struct kernel_param *kp)
|
|||
{
|
||||
int count = 0, i;
|
||||
|
||||
for (i = 0; i < CUSTOM_FW_PATH_COUNT; i++) {
|
||||
for (i = 0; i < CUSTOM_FW_PATH_COUNT; i++)
|
||||
if (strlen(fw_path_para[i]) != 0)
|
||||
count += scnprintf(buffer + count, PATH_SIZE, "%s%s", fw_path_para[i], ",");
|
||||
}
|
||||
count += sysfs_emit_at(buffer, count, "%s,", fw_path_para[i]);
|
||||
|
||||
buffer[count - 1] = '\0';
|
||||
|
||||
return count - 1;
|
||||
return count;
|
||||
}
|
||||
/*
|
||||
* Typical usage is that passing 'firmware_class.path=/vendor,/firwmare_mnt'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue