diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index 491d8641af..aa165accfa 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -1755,14 +1755,6 @@ static int fat_truncate(FAR struct file *filep, off_t length) int ndx; /* We are shrinking the file. */ - /* Flush any unwritten data in the file buffer */ - - ret = fat_ffcacheflush(fs, ff); - if (ret < 0) - { - goto errout_with_semaphore; - } - /* Read the directory entry into the fs_buffer. */ ret = fat_fscacheread(fs, ff->ff_dirsector); diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c index 669b65d09f..cdbfc2d4cb 100644 --- a/fs/fat/fs_fat32util.c +++ b/fs/fat/fs_fat32util.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fat/fs_fat32util.c * - * Copyright (C) 2007-2009, 2011, 2013, 2015, 2017 Gregory Nutt. All + * Copyright (C) 2007-2009, 2011, 2013, 2015, 2017-2018 Gregory Nutt. All * rights reserved. * Author: Gregory Nutt * @@ -1781,9 +1781,10 @@ int fat_fscacheflush(struct fat_mountpt_s *fs) if (fs->fs_currentsector >= fs->fs_fatbase && fs->fs_currentsector < fs->fs_fatbase + fs->fs_nfatsects) { - /* Yes, then make the change in the FAT copy as well */ int i; + /* Yes, then make the change in the FAT copy as well */ + for (i = fs->fs_fatnumfats; i >= 2; i--) { fs->fs_currentsector += fs->fs_nfatsects; diff --git a/libnx/nxfonts/Kconfig b/libnx/nxfonts/Kconfig index d979c5b445..5acc2a8348 100644 --- a/libnx/nxfonts/Kconfig +++ b/libnx/nxfonts/Kconfig @@ -394,8 +394,6 @@ config NXFONTS_DISABLE_32BPP support for unused color depths. The selection disables support for 32BPP pixel depth. -endmenu - config NXFONTS_PACKEDMSFIRST bool "Packed MS First" default y if !NX || NX_PACKEDMSFIRST @@ -404,3 +402,6 @@ config NXFONTS_PACKEDMSFIRST ---help--- If a pixel depth of less than 8-bits is used, then NX needs to know if the pixels pack from the MS to LS or from LS to MS + +endmenu + diff --git a/net/route/net_cacheroute.c b/net/route/net_cacheroute.c index 6c601ca5cf..8050962d1e 100644 --- a/net/route/net_cacheroute.c +++ b/net/route/net_cacheroute.c @@ -45,6 +45,8 @@ #include #include +#include + #include "route/cacheroute.h" #include "route/route.h" @@ -177,8 +179,8 @@ static sem_t g_ipv6_cachelock; * ****************************************************************************/ -#define net_lock_ipv4_cache() mxsem_wait(&g_ipv4_cachelock); -#define net_lock_ipv6_cache() mxsem_wait(&g_ipv6_cachelock); +#define net_lock_ipv4_cache() nxsem_wait(&g_ipv4_cachelock); +#define net_lock_ipv6_cache() nxsem_wait(&g_ipv6_cachelock); /**************************************************************************** * Name: net_unlock_ipv4_cache and net_unlock_ipv6_cache diff --git a/net/route/net_del_fileroute.c b/net/route/net_del_fileroute.c index 745acfa7e1..992ff3e2f5 100644 --- a/net/route/net_del_fileroute.c +++ b/net/route/net_del_fileroute.c @@ -325,7 +325,7 @@ int net_delroute_ipv4(in_addr_t target, in_addr_t netmask) ret = file_truncate(&fshandle, filesize); errout_with_fshandle: - (void)net_closeroute_ipv4(&fshandle)S; + (void)net_closeroute_ipv4(&fshandle); errout_with_lock: (void)net_unlockroute_ipv4(); diff --git a/net/route/net_fileroute.c b/net/route/net_fileroute.c index 36a0e486b3..32074efd85 100644 --- a/net/route/net_fileroute.c +++ b/net/route/net_fileroute.c @@ -47,6 +47,7 @@ #include #include +#include #include #include "route/fileroute.h" @@ -716,7 +717,7 @@ int net_lockroute_ipv6(void) ret = nxsem_wait(&g_ipv6_exclsem); if (ret < 0) { - nerr("ERROR: nxsem_wait() failed: %d\n", errcode); + nerr("ERROR: nxsem_wait() failed: %d\n", ret); } else {