net/route: Fix a couple of compile-related issues that have crept in sense the last time the file-based routing table was used.

This commit is contained in:
Gregory Nutt 2018-01-05 08:57:22 -06:00
parent fb73006a4b
commit 376e30dab4
6 changed files with 13 additions and 16 deletions

View File

@ -1755,14 +1755,6 @@ static int fat_truncate(FAR struct file *filep, off_t length)
int ndx; int ndx;
/* We are shrinking the file. */ /* 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. */ /* Read the directory entry into the fs_buffer. */
ret = fat_fscacheread(fs, ff->ff_dirsector); ret = fat_fscacheread(fs, ff->ff_dirsector);

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* fs/fat/fs_fat32util.c * 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. * rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
@ -1781,9 +1781,10 @@ int fat_fscacheflush(struct fat_mountpt_s *fs)
if (fs->fs_currentsector >= fs->fs_fatbase && if (fs->fs_currentsector >= fs->fs_fatbase &&
fs->fs_currentsector < fs->fs_fatbase + fs->fs_nfatsects) fs->fs_currentsector < fs->fs_fatbase + fs->fs_nfatsects)
{ {
/* Yes, then make the change in the FAT copy as well */
int i; int i;
/* Yes, then make the change in the FAT copy as well */
for (i = fs->fs_fatnumfats; i >= 2; i--) for (i = fs->fs_fatnumfats; i >= 2; i--)
{ {
fs->fs_currentsector += fs->fs_nfatsects; fs->fs_currentsector += fs->fs_nfatsects;

View File

@ -394,8 +394,6 @@ config NXFONTS_DISABLE_32BPP
support for unused color depths. The selection disables support for 32BPP support for unused color depths. The selection disables support for 32BPP
pixel depth. pixel depth.
endmenu
config NXFONTS_PACKEDMSFIRST config NXFONTS_PACKEDMSFIRST
bool "Packed MS First" bool "Packed MS First"
default y if !NX || NX_PACKEDMSFIRST default y if !NX || NX_PACKEDMSFIRST
@ -404,3 +402,6 @@ config NXFONTS_PACKEDMSFIRST
---help--- ---help---
If a pixel depth of less than 8-bits is used, then NX needs to know if the 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 pixels pack from the MS to LS or from LS to MS
endmenu

View File

@ -45,6 +45,8 @@
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
#include <nuttx/semaphore.h>
#include "route/cacheroute.h" #include "route/cacheroute.h"
#include "route/route.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_ipv4_cache() nxsem_wait(&g_ipv4_cachelock);
#define net_lock_ipv6_cache() mxsem_wait(&g_ipv6_cachelock); #define net_lock_ipv6_cache() nxsem_wait(&g_ipv6_cachelock);
/**************************************************************************** /****************************************************************************
* Name: net_unlock_ipv4_cache and net_unlock_ipv6_cache * Name: net_unlock_ipv4_cache and net_unlock_ipv6_cache

View File

@ -325,7 +325,7 @@ int net_delroute_ipv4(in_addr_t target, in_addr_t netmask)
ret = file_truncate(&fshandle, filesize); ret = file_truncate(&fshandle, filesize);
errout_with_fshandle: errout_with_fshandle:
(void)net_closeroute_ipv4(&fshandle)S; (void)net_closeroute_ipv4(&fshandle);
errout_with_lock: errout_with_lock:
(void)net_unlockroute_ipv4(); (void)net_unlockroute_ipv4();

View File

@ -47,6 +47,7 @@
#include <assert.h> #include <assert.h>
#include <debug.h> #include <debug.h>
#include <nuttx/semaphore.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include "route/fileroute.h" #include "route/fileroute.h"
@ -716,7 +717,7 @@ int net_lockroute_ipv6(void)
ret = nxsem_wait(&g_ipv6_exclsem); ret = nxsem_wait(&g_ipv6_exclsem);
if (ret < 0) if (ret < 0)
{ {
nerr("ERROR: nxsem_wait() failed: %d\n", errcode); nerr("ERROR: nxsem_wait() failed: %d\n", ret);
} }
else else
{ {