fs/fat: CONFIG_FAT_MAXFNAME may not exceed NAME_MAX (CONFIG_NAME_MAX)
This commit is contained in:
parent
eed14e5eb1
commit
9638f3f065
@ -340,7 +340,7 @@ static int lpc54_i2c_start(struct lpc54_i2cdev_s *priv)
|
||||
static void lpc54_i2c_stop(struct lpc54_i2cdev_s *priv)
|
||||
{
|
||||
(void)lpc54_wait_pendingstatus(priv);
|
||||
lpc54_i2c_putreg(pric, LPC54_I2C_MSTCTL_OFFSET, I2C_MSTCTL_MSTSTOP);
|
||||
lpc54_i2c_putreg(priv, LPC54_I2C_MSTCTL_OFFSET, I2C_MSTCTL_MSTSTOP);
|
||||
nxsem_post(&priv->waitsem);
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ config FAT_MAXFNAME
|
||||
int "FAT maximum file name size"
|
||||
depends on FAT_LFN
|
||||
default 32
|
||||
range 1 255
|
||||
---help---
|
||||
If FAT_LFN is defined, then the default, maximum long file
|
||||
name is 255 bytes. This can eat up a lot of memory (especially stack
|
||||
@ -42,6 +43,9 @@ config FAT_MAXFNAME
|
||||
good choice would be the same value as selected for NAME_MAX which will
|
||||
limit the visibility of longer file names anyway.
|
||||
|
||||
This setting may not exceed NAME_MAX. That will be verified at compile
|
||||
time.
|
||||
|
||||
config FS_FATTIME
|
||||
bool "FAT timestamps"
|
||||
default n
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* fs/fat/fs_fat32.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -229,6 +229,12 @@
|
||||
|
||||
/* Sizes and limits */
|
||||
|
||||
# if CONFIG_FAT_MAXFNAME > CONFIG_NAME_MAX
|
||||
# warning CONFIG_FAT_MAXFNAME may not exceed NAME_MAX (CONFIG_NAME_MAX)
|
||||
# undef CONFIG_FAT_MAXFNAME
|
||||
# define CONFIG_FAT_MAXFNAME CONFIG_NAME_MAX
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_FAT_MAXFNAME /* The maximum support filename can be limited */
|
||||
# define LDIR_MAXFNAME 255 /* Max unicode characters in file name */
|
||||
# elif CONFIG_FAT_MAXFNAME <= 255
|
||||
|
Loading…
Reference in New Issue
Block a user