mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
fs/ioctl:add FIOC_XIPBASE to get file xip address
in tmpfs/romfs, we can get file real xip address to execute program Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
@@ -1825,6 +1825,13 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
else if (cmd == FIOC_XIPBASE)
|
||||
{
|
||||
FAR uintptr_t *ptr = (FAR uintptr_t *)arg;
|
||||
|
||||
*ptr = (uintptr_t)tfo->tfo_data;
|
||||
return OK;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user