tools/gencromfs.c: Was duplicating all mode bits in source directory in CROMFS directory. Some make no sense. In particular, all write-able bits are cleard unconditionally. Executable bits are still copying because there is really no way for the tool to know if the file is executable or not.
This commit is contained in:
parent
67e0603b5a
commit
db3b507a41
@ -842,16 +842,13 @@ static uint16_t get_mode(mode_t mode)
|
||||
{
|
||||
uint16_t ret = 0;
|
||||
|
||||
/* Convert mode to CROMFS NuttX read-only mode */
|
||||
|
||||
if ((mode & S_IXOTH) != 0)
|
||||
{
|
||||
ret |= NUTTX_IXOTH;
|
||||
}
|
||||
|
||||
if ((mode & S_IWOTH) != 0)
|
||||
{
|
||||
ret |= NUTTX_IWOTH;
|
||||
}
|
||||
|
||||
if ((mode & S_IROTH) != 0)
|
||||
{
|
||||
ret |= NUTTX_IROTH;
|
||||
@ -862,11 +859,6 @@ static uint16_t get_mode(mode_t mode)
|
||||
ret |= NUTTX_IXGRP;
|
||||
}
|
||||
|
||||
if ((mode & S_IWGRP) != 0)
|
||||
{
|
||||
ret |= NUTTX_IWGRP;
|
||||
}
|
||||
|
||||
if ((mode & S_IRGRP) != 0)
|
||||
{
|
||||
ret |= NUTTX_IRGRP;
|
||||
@ -877,11 +869,6 @@ static uint16_t get_mode(mode_t mode)
|
||||
ret |= NUTTX_IXUSR;
|
||||
}
|
||||
|
||||
if ((mode & S_IWUSR) != 0)
|
||||
{
|
||||
ret |= NUTTX_IWUSR;
|
||||
}
|
||||
|
||||
if ((mode & S_IRUSR) != 0)
|
||||
{
|
||||
ret |= NUTTX_IRUSR;
|
||||
|
Loading…
Reference in New Issue
Block a user