Ensure the kernel component don't call userspace API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
cf73496d9e
commit
9473434587
@ -891,7 +891,7 @@ static int cxd56_gnss_save_backup_data(FAR struct file *filep,
|
||||
unsigned long arg)
|
||||
{
|
||||
FAR char *buf;
|
||||
int fd;
|
||||
struct file file;
|
||||
int n = 0;
|
||||
int32_t offset = 0;
|
||||
|
||||
@ -901,30 +901,30 @@ static int cxd56_gnss_save_backup_data(FAR struct file *filep,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
fd = nx_open(CONFIG_CXD56_GNSS_BACKUP_FILENAME,
|
||||
O_WRONLY | O_CREAT | O_TRUNC);
|
||||
if (fd < 0)
|
||||
n = file_open(&file, CONFIG_CXD56_GNSS_BACKUP_FILENAME,
|
||||
O_WRONLY | O_CREAT | O_TRUNC);
|
||||
if (n < 0)
|
||||
{
|
||||
kmm_free(buf);
|
||||
return fd;
|
||||
return n;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
n = fw_gd_readbuffer(CXD56_CPU1_DATA_TYPE_BACKUP, offset, buf,
|
||||
CONFIG_CXD56_GNSS_BACKUP_BUFFER_SIZE);
|
||||
CONFIG_CXD56_GNSS_BACKUP_BUFFER_SIZE);
|
||||
if (n <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
n = nx_write(fd, buf, n);
|
||||
n = file_write(&file, buf, n);
|
||||
offset += n;
|
||||
}
|
||||
while (n == CONFIG_CXD56_GNSS_BACKUP_BUFFER_SIZE);
|
||||
|
||||
kmm_free(buf);
|
||||
nx_close(fd);
|
||||
file_close(&file);
|
||||
|
||||
return n < 0 ? n : 0;
|
||||
}
|
||||
@ -948,7 +948,7 @@ static int cxd56_gnss_save_backup_data(FAR struct file *filep,
|
||||
static int cxd56_gnss_erase_backup_data(FAR struct file *filep,
|
||||
unsigned long arg)
|
||||
{
|
||||
return unlink(CONFIG_CXD56_GNSS_BACKUP_FILENAME);
|
||||
return nx_unlink(CONFIG_CXD56_GNSS_BACKUP_FILENAME);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -2208,7 +2208,7 @@ cxd56_gnss_read_cep_file(FAR struct file *fp, int32_t offset,
|
||||
static void cxd56_gnss_read_backup_file(FAR int *retval)
|
||||
{
|
||||
FAR char * buf;
|
||||
int fd;
|
||||
struct file file;
|
||||
int32_t offset = 0;
|
||||
size_t n;
|
||||
int ret = 0;
|
||||
@ -2220,17 +2220,16 @@ static void cxd56_gnss_read_backup_file(FAR int *retval)
|
||||
goto _err;
|
||||
}
|
||||
|
||||
fd = nx_open(CONFIG_CXD56_GNSS_BACKUP_FILENAME, O_RDONLY);
|
||||
if (fd < 0)
|
||||
ret = file_open(&file, CONFIG_CXD56_GNSS_BACKUP_FILENAME, O_RDONLY);
|
||||
if (ret < 0)
|
||||
{
|
||||
kmm_free(buf);
|
||||
ret = fd;
|
||||
goto _err;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
n = nx_read(fd, buf, CONFIG_CXD56_GNSS_BACKUP_BUFFER_SIZE);
|
||||
n = file_read(&file, buf, CONFIG_CXD56_GNSS_BACKUP_BUFFER_SIZE);
|
||||
if (n <= 0)
|
||||
{
|
||||
ret = n;
|
||||
@ -2247,7 +2246,7 @@ static void cxd56_gnss_read_backup_file(FAR int *retval)
|
||||
}
|
||||
while (n > 0);
|
||||
|
||||
nx_close(fd);
|
||||
file_close(&file);
|
||||
kmm_free(buf);
|
||||
|
||||
/* Notify the termination of backup sequence by write zero length data */
|
||||
|
@ -151,7 +151,7 @@ static int icc_semtake(sem_t *semid)
|
||||
|
||||
static int icc_semtrytake(sem_t *semid)
|
||||
{
|
||||
return sem_trywait(semid);
|
||||
return nxsem_trywait(semid);
|
||||
}
|
||||
|
||||
static void icc_semgive(sem_t *semid)
|
||||
@ -312,7 +312,6 @@ static int icc_recv(FAR struct iccdev_s *priv, FAR iccmsg_t *msg, int32_t ms)
|
||||
ret = icc_semtrytake(&priv->rxwait);
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = -get_errno();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
@ -39,6 +38,8 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/signal.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_FS_EVFAT
|
||||
# include <nuttx/fs/mkevfatfs.h>
|
||||
#endif
|
||||
@ -176,7 +177,7 @@ static int blk_write(const void *buf, int len, const char *path, int offset)
|
||||
|
||||
static int install_recovery(const char *srcpath)
|
||||
{
|
||||
int rfd;
|
||||
struct file rfile;
|
||||
int i;
|
||||
int len;
|
||||
int rem;
|
||||
@ -188,9 +189,9 @@ static int install_recovery(const char *srcpath)
|
||||
return -1;
|
||||
}
|
||||
|
||||
rfd = open(srcpath, O_RDONLY, 0444);
|
||||
ret = file_open(&rfile, srcpath, O_RDONLY, 0444);
|
||||
|
||||
if (read(rfd, &upg_image, sizeof(upg_image)) != sizeof(upg_image))
|
||||
if (file_read(&rfile, &upg_image, sizeof(upg_image)) != sizeof(upg_image))
|
||||
{
|
||||
_info("read head");
|
||||
ret = -EIO;
|
||||
@ -228,7 +229,7 @@ static int install_recovery(const char *srcpath)
|
||||
goto err;
|
||||
}
|
||||
|
||||
lseek(rfd, upg_image.chunk[i].offset +
|
||||
file_seek(&rfile, upg_image.chunk[i].offset +
|
||||
((void *)&upg_image.chunk[upg_image.chunknum] - (void *)&upg_image),
|
||||
SEEK_SET);
|
||||
|
||||
@ -236,7 +237,7 @@ static int install_recovery(const char *srcpath)
|
||||
|
||||
while (rem > 0)
|
||||
{
|
||||
len = read(rfd, copybuf, rem > 512 ? 512 : rem);
|
||||
len = file_read(&rfile, copybuf, rem > 512 ? 512 : rem);
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
@ -255,7 +256,7 @@ err:
|
||||
bchlib_teardown(handle);
|
||||
}
|
||||
|
||||
close(rfd);
|
||||
file_close(&rfile);
|
||||
_info("DONE\n");
|
||||
return ret;
|
||||
}
|
||||
@ -585,7 +586,7 @@ static int msc_enable(int forced)
|
||||
|
||||
/* check recovery kernel update */
|
||||
|
||||
mount(CONFIG_MTD_CP_DEVPATH, "/mnt/sd0", "evfat", 0, NULL);
|
||||
nx_mount(CONFIG_MTD_CP_DEVPATH, "/mnt/sd0", "evfat", 0, NULL);
|
||||
nxsig_usleep(10000);
|
||||
|
||||
/* recovery kernel install from UPG.img */
|
||||
@ -677,7 +678,7 @@ int ipl2_main(int argc, char *argv[])
|
||||
{
|
||||
/* check recovery kernel update */
|
||||
|
||||
mount(CONFIG_MTD_CP_DEVPATH, "/mnt/sd0", "evfat", 0, NULL);
|
||||
nx_mount(CONFIG_MTD_CP_DEVPATH, "/mnt/sd0", "evfat", 0, NULL);
|
||||
nxsig_usleep(10000);
|
||||
|
||||
/* recovery kernel install from UPG.img */
|
||||
|
@ -1183,7 +1183,6 @@ nrf52_radio_initialize(int intf, FAR struct nrf52_radio_board_s *board)
|
||||
if (ret < 0)
|
||||
{
|
||||
wlerr("ERROR: failed to reset radio interface %d\n", ret);
|
||||
errno = ret;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -1193,7 +1192,6 @@ nrf52_radio_initialize(int intf, FAR struct nrf52_radio_board_s *board)
|
||||
if (ret < 0)
|
||||
{
|
||||
wlerr("ERROR: failed to setup radio interface %d\n", ret);
|
||||
errno = ret;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -1355,7 +1355,7 @@ static int ssc_rxdma_setup(struct sam_ssc_s *priv)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
i2serr("ERROR: wd_start failed: %d\n", errno);
|
||||
i2serr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1771,7 +1771,7 @@ static int ssc_txdma_setup(struct sam_ssc_s *priv)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
i2serr("ERROR: wd_start failed: %d\n", errno);
|
||||
i2serr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1331,7 +1331,7 @@ static int ssc_rxdma_setup(struct sam_ssc_s *priv)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
i2serr("ERROR: wd_start failed: %d\n", errno);
|
||||
i2serr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1751,7 +1751,7 @@ static int ssc_txdma_setup(struct sam_ssc_s *priv)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
i2serr("ERROR: wd_start failed: %d\n", errno);
|
||||
i2serr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ static int i2s_rxdma_setup(struct stm32_i2s_s *priv)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
i2serr("ERROR: wd_start failed: %d\n", errno);
|
||||
i2serr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1505,7 +1505,7 @@ static int i2s_txdma_setup(struct stm32_i2s_s *priv)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
i2serr("ERROR: wd_start failed: %d\n", errno);
|
||||
i2serr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
# include <sys/mount.h>
|
||||
# include <nuttx/fs/fs.h>
|
||||
#endif
|
||||
|
||||
#include <syslog.h>
|
||||
@ -100,7 +100,7 @@ int a1x_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -39,9 +39,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USERLED
|
||||
# include <nuttx/leds/userled.h>
|
||||
#endif
|
||||
@ -160,7 +161,7 @@ int am335x_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <sys/mount.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "cxd56_emmc.h"
|
||||
|
||||
@ -76,10 +76,10 @@ int board_emmc_initialize(void)
|
||||
|
||||
/* Mount the eMMC deivce */
|
||||
|
||||
ret = mount("/dev/emmc0", "/mnt/emmc", "vfat", 0, NULL);
|
||||
ret = nx_mount("/dev/emmc0", "/mnt/emmc", "vfat", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the eMMC. %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the eMMC. %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <sys/mount.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <arch/board/board.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
|
||||
@ -89,10 +89,10 @@ int board_flash_initialize(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = mount("/dev/smart0d1", "/mnt/spif", "smartfs", 0, NULL);
|
||||
ret = nx_mount("/dev/smart0d1", "/mnt/spif", "smartfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the SmartFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the SmartFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -106,10 +106,10 @@ int board_flash_initialize(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = mount(NULL, "/mnt/spif", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/spif", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -208,7 +208,7 @@ static sem_t g_rotexc;
|
||||
static sem_t g_geexc;
|
||||
static sem_t g_abexc;
|
||||
|
||||
static int g_gfd = -1;
|
||||
static struct file g_gfile;
|
||||
static char g_gcmdbuf[256] __attribute__ ((aligned(16)));
|
||||
|
||||
/****************************************************************************
|
||||
@ -534,7 +534,7 @@ void imageproc_initialize(void)
|
||||
|
||||
cxd56_ge2dinitialize(GEDEVNAME);
|
||||
|
||||
g_gfd = open(GEDEVNAME, O_RDWR);
|
||||
file_open(&g_gfile, GEDEVNAME, O_RDWR);
|
||||
|
||||
putreg32(1, ROT_INTR_CLEAR);
|
||||
putreg32(0, ROT_INTR_ENABLE);
|
||||
@ -549,10 +549,9 @@ void imageproc_finalize(void)
|
||||
up_disable_irq(CXD56_IRQ_ROT);
|
||||
irq_detach(CXD56_IRQ_ROT);
|
||||
|
||||
if (g_gfd > 0)
|
||||
if (g_gfile.f_inode)
|
||||
{
|
||||
close(g_gfd);
|
||||
g_gfd = -1;
|
||||
file_close(&g_gfile);
|
||||
}
|
||||
|
||||
cxd56_ge2duninitialize(GEDEVNAME);
|
||||
@ -605,7 +604,7 @@ int imageproc_resize(uint8_t * ibuf,
|
||||
size_t len;
|
||||
int ret;
|
||||
|
||||
if (g_gfd <= 0)
|
||||
if (g_gfile.f_inode == NULL)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
@ -663,7 +662,7 @@ int imageproc_resize(uint8_t * ibuf,
|
||||
/* Process resize */
|
||||
|
||||
len = (uintptr_t) cmd - (uintptr_t) g_gcmdbuf;
|
||||
ret = write(g_gfd, g_gcmdbuf, len);
|
||||
ret = file_write(&g_gfile, g_gcmdbuf, len);
|
||||
if (ret < 0)
|
||||
{
|
||||
ip_semgive(&g_geexc);
|
||||
@ -691,7 +690,7 @@ int imageproc_clip_and_resize(uint8_t * ibuf,
|
||||
uint16_t clip_width = 0;
|
||||
uint16_t clip_height = 0;
|
||||
|
||||
if (g_gfd <= 0)
|
||||
if (g_gfile.f_inode == NULL)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
@ -782,7 +781,7 @@ int imageproc_clip_and_resize(uint8_t * ibuf,
|
||||
/* Process resize */
|
||||
|
||||
len = (uintptr_t) cmd - (uintptr_t) g_gcmdbuf;
|
||||
ret = write(g_gfd, g_gcmdbuf, len);
|
||||
ret = file_write(&g_gfile, g_gcmdbuf, len);
|
||||
if (ret < 0)
|
||||
{
|
||||
ip_semgive(&g_geexc);
|
||||
@ -973,7 +972,7 @@ int imageproc_alpha_blend(imageproc_imginfo_t *dst,
|
||||
/* Process alpha blending */
|
||||
|
||||
len = (uintptr_t)cmd - (uintptr_t)g_gcmdbuf;
|
||||
ret = write(g_gfd, g_gcmdbuf, len);
|
||||
ret = file_write(&g_gfile, g_gcmdbuf, len);
|
||||
if (ret < 0)
|
||||
{
|
||||
ip_semgive(&g_abexc);
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <sys/mount.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include "cxd56_spi.h"
|
||||
#include "cxd56_gpio.h"
|
||||
|
||||
@ -91,10 +91,10 @@ int board_spisd_initialize(int minor, int bus)
|
||||
|
||||
/* Mount filesystem */
|
||||
|
||||
ret = mount("/dev/mmcsd0", "/mnt/sd0", "vfat", 0, NULL);
|
||||
ret = nx_mount("/dev/mmcsd0", "/mnt/sd0", "vfat", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount the SDCARD. %d\n", errno);
|
||||
_err("ERROR: Failed to mount the SDCARD. %d\n", ret);
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
@ -25,14 +25,13 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#ifdef CONFIG_RNDIS
|
||||
@ -325,10 +324,10 @@ int cxd56_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = mount(NULL, CXD56_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, CXD56_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount the procfs: %d\n", errno);
|
||||
_err("ERROR: Failed to mount the procfs: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -360,7 +359,7 @@ int cxd56_bringup(void)
|
||||
ret = board_flash_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI-Flash. %d\n", errno);
|
||||
_err("ERROR: Failed to initialize SPI-Flash. %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -376,13 +375,13 @@ int cxd56_bringup(void)
|
||||
ret = board_isx012_initialize(IMAGER_I2C);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize ISX012 board. %d\n", errno);
|
||||
_err("ERROR: Failed to initialize ISX012 board. %d\n", ret);
|
||||
}
|
||||
|
||||
devops = isx012_initialize();
|
||||
if (devops == NULL)
|
||||
{
|
||||
_err("ERROR: Failed to populate ISX012 devops. %d\n", errno);
|
||||
_err("ERROR: Failed to populate ISX012 devops. %d\n", ret);
|
||||
ret = ERROR;
|
||||
}
|
||||
#endif /* CONFIG_VIDEO_ISX012 */
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
@ -34,6 +33,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
@ -148,7 +148,7 @@ static void board_sdcard_enable(FAR void *arg)
|
||||
{
|
||||
if (S_ISBLK(stat_sdio.st_mode))
|
||||
{
|
||||
ret = mount("/dev/mmcsd0", "/mnt/sd0", "vfat", 0, NULL);
|
||||
ret = nx_mount("/dev/mmcsd0", "/mnt/sd0", "vfat", 0, NULL);
|
||||
if (ret == 0)
|
||||
{
|
||||
finfo(
|
||||
@ -156,7 +156,7 @@ static void board_sdcard_enable(FAR void *arg)
|
||||
}
|
||||
else
|
||||
{
|
||||
_err("ERROR: Failed to mount the SDCARD. %d\n", errno);
|
||||
_err("ERROR: Failed to mount the SDCARD. %d\n", ret);
|
||||
cxd56_sdio_resetstatus(g_sdhci.sdhci);
|
||||
goto release_frequency_lock;
|
||||
}
|
||||
@ -189,10 +189,10 @@ static void board_sdcard_disable(FAR void *arg)
|
||||
{
|
||||
/* un-mount */
|
||||
|
||||
ret = umount("/mnt/sd0");
|
||||
ret = nx_umount2("/mnt/sd0", 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to unmount the SD Card: %d\n", errno);
|
||||
ferr("ERROR: Failed to unmount the SD Card: %d\n", ret);
|
||||
}
|
||||
|
||||
/* Report the new state to the SDIO driver */
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "sabre-6quad.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -64,7 +65,7 @@ int imx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,11 +40,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/wireless/bluetooth/bt_uart.h>
|
||||
|
||||
@ -178,7 +178,7 @@ int imxrt_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -39,11 +39,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <syslog.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
#include <imxrt_lpi2c.h>
|
||||
@ -151,7 +151,7 @@ int imxrt_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,11 +40,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <syslog.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
#include <imxrt_lpi2c.h>
|
||||
@ -165,7 +165,7 @@ int imxrt_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <syslog.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
#include <imxrt_lpi2c.h>
|
||||
@ -127,7 +127,7 @@ int imxrt_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
@ -32,6 +31,8 @@
|
||||
|
||||
#include "freedom-k28f.h"
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_PL2303
|
||||
# include <nuttx/usb/pl2303.h>
|
||||
#endif
|
||||
@ -66,7 +67,7 @@ int k28_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
@ -103,15 +104,15 @@ int k28_bringup(void)
|
||||
{
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_FRDMK28F_SDHC_MOUNT_BLKDEV,
|
||||
CONFIG_FRDMK28F_SDHC_MOUNT_MOUNTPOINT,
|
||||
CONFIG_FRDMK28F_SDHC_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_FRDMK28F_SDHC_MOUNT_BLKDEV,
|
||||
CONFIG_FRDMK28F_SDHC_MOUNT_MOUNTPOINT,
|
||||
CONFIG_FRDMK28F_SDHC_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_FRDMK28F_SDHC_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_FRDMK28F_SDHC_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
@ -288,15 +289,11 @@ static void usb_msc_connect(FAR void *arg)
|
||||
|
||||
/* Mount */
|
||||
|
||||
ret = mount((FAR const char *)blkdev, (FAR const char *)mntpnt,
|
||||
ret = nx_mount((FAR const char *)blkdev, (FAR const char *)mntpnt,
|
||||
CONFIG_FRDMK28F_USB_AUTOMOUNT_FSTYPE, 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
ferr("ERROR: Mount failed: %d\n", errcode);
|
||||
UNUSED(errcode);
|
||||
ferr("ERROR: Mount failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,18 +361,15 @@ static void usb_msc_disconnect(FAR void *arg)
|
||||
|
||||
/* Unmount */
|
||||
|
||||
ret = umount2((FAR const char *)mntpnt, MNT_FORCE);
|
||||
ret = nx_umount2((FAR const char *)mntpnt, MNT_FORCE);
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
DEBUGASSERT(errcode > 0);
|
||||
|
||||
/* We expect the error to be EBUSY meaning that the volume could
|
||||
* not be unmounted because there are currently reference via open
|
||||
* files or directories.
|
||||
*/
|
||||
|
||||
if (errcode == EBUSY)
|
||||
if (ret == -EBUSY)
|
||||
{
|
||||
finfo("WARNING: Volume is busy, try again later\n");
|
||||
|
||||
|
@ -40,11 +40,12 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef HAVE_RTC_DRIVER
|
||||
# include <nuttx/timers/rtc.h>
|
||||
# include "kinetis_alarm.h"
|
||||
@ -78,12 +79,11 @@ int k64_bringup(void)
|
||||
|
||||
syslog(LOG_INFO, "Mounting procfs to /proc\n");
|
||||
|
||||
ret = mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to mount the PROC filesystem: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -108,15 +108,15 @@ int k64_bringup(void)
|
||||
{
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_FRDMK64F_SDHC_MOUNT_BLKDEV,
|
||||
CONFIG_FRDMK64F_SDHC_MOUNT_MOUNTPOINT,
|
||||
CONFIG_FRDMK64F_SDHC_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_FRDMK64F_SDHC_MOUNT_BLKDEV,
|
||||
CONFIG_FRDMK64F_SDHC_MOUNT_MOUNTPOINT,
|
||||
CONFIG_FRDMK64F_SDHC_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_FRDMK64F_SDHC_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_FRDMK64F_SDHC_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,11 +41,12 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/input/buttons.h>
|
||||
@ -79,12 +80,11 @@ int k66_bringup(void)
|
||||
|
||||
syslog(LOG_INFO, "Mounting procfs to /proc\n");
|
||||
|
||||
ret = mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to mount the PROC filesystem: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -103,15 +103,15 @@ int k66_bringup(void)
|
||||
{
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_FRDMK66F_SDHC_MOUNT_BLKDEV,
|
||||
CONFIG_FRDMK66F_SDHC_MOUNT_MOUNTPOINT,
|
||||
CONFIG_FRDMK66F_SDHC_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_FRDMK66F_SDHC_MOUNT_BLKDEV,
|
||||
CONFIG_FRDMK66F_SDHC_MOUNT_MOUNTPOINT,
|
||||
CONFIG_FRDMK66F_SDHC_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_FRDMK66F_SDHC_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_FRDMK66F_SDHC_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,9 @@
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_KINETIS_SDHC
|
||||
# include <nuttx/sdio.h>
|
||||
@ -93,12 +93,11 @@ int board_app_initialize(uintptr_t arg)
|
||||
|
||||
syslog(LOG_INFO, "Mounting procfs to /proc\n");
|
||||
|
||||
ret = mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to mount the PROC filesystem: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <syslog.h>
|
||||
@ -34,6 +33,7 @@
|
||||
# include <sched.h>
|
||||
#endif
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/sched.h>
|
||||
|
||||
#ifdef CONFIG_RNDIS
|
||||
@ -78,7 +78,7 @@ int lc823450_bringup(void)
|
||||
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
@ -86,7 +86,7 @@ int lc823450_bringup(void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_FAT
|
||||
ret = mount("/dev/mtdblock0p10", "/mnt/sd0", "vfat", 0, NULL);
|
||||
ret = nx_mount("/dev/mtdblock0p10", "/mnt/sd0", "vfat", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount vfat at /mnt/sd0: %d\n", ret);
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
@ -49,6 +48,7 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
@ -354,7 +354,7 @@ int lpc4088_devkit_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system at the default location, /proc */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs: %d\n", ret);
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
@ -49,6 +48,7 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
@ -390,7 +390,7 @@ int lpc4088_quickstart_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system at the default location, /proc */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs: %d\n", ret);
|
||||
|
@ -44,11 +44,11 @@
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
@ -390,7 +390,7 @@ int lx_cpu_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system at the default location, /proc */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs: %d\n", ret);
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
@ -47,6 +46,7 @@
|
||||
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/usb/usbhost.h>
|
||||
@ -373,7 +373,7 @@ int mcb1700_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -39,12 +39,12 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
@ -392,7 +392,7 @@ int lpc17_40_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
@ -49,6 +48,7 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
@ -389,7 +389,7 @@ int open1788_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system at the default location, /proc */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs: %d\n", ret);
|
||||
|
@ -42,9 +42,9 @@
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/binfmt/elf.h>
|
||||
#include <nuttx/binfmt/nxflat.h>
|
||||
@ -120,21 +120,20 @@ int pnev5180b_bringup(void)
|
||||
int ret = OK;
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount the PROC filesystem: %d\n",
|
||||
ret);
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_BINFS
|
||||
ret = mount(NULL, "/bin", "binfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/bin", "binfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount the BIN filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount the BIN filesystem: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/drivers/ramdisk.h>
|
||||
#include "lpc17_40_romfs.h"
|
||||
|
||||
@ -146,12 +147,12 @@ int lpc17_40_romfs_initialize(void)
|
||||
finfo("Mounting ROMFS filesystem at target=%s with source=%s\n",
|
||||
CONFIG_LPC17_40_ROMFS_MOUNTPOINT, MOUNT_DEVNAME);
|
||||
|
||||
ret = mount(MOUNT_DEVNAME, CONFIG_LPC17_40_ROMFS_MOUNTPOINT,
|
||||
ret = nx_mount(MOUNT_DEVNAME, CONFIG_LPC17_40_ROMFS_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_LPC17_40_ROMFS_MOUNTPOINT, errno);
|
||||
ferr("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_LPC17_40_ROMFS_MOUNTPOINT, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -44,11 +44,10 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include "lpc17_40_ssp.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -156,12 +155,11 @@ int board_app_initialize(uintptr_t arg)
|
||||
|
||||
syslog(LOG_INFO, "Mounting procfs to /proc\n");
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to mount the PROC filesystem: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -84,7 +84,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -183,7 +183,7 @@
|
||||
struct pg_source_s
|
||||
{
|
||||
bool initialized; /* TRUE: we are initialized */
|
||||
int fd; /* File descriptor of the nuttx.bin file */
|
||||
struct file file; /* File descriptor of the nuttx.bin file */
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -272,16 +272,16 @@ static inline void lpc31_initsrc(void)
|
||||
/* Now mount the file system */
|
||||
|
||||
snprintf(devname, 16, "/dev/mmcsd%d", CONFIG_EA3131_PAGING_MINOR);
|
||||
ret = mount(devname, CONFIG_EA3131_PAGING_MOUNTPT, "vfat", MS_RDONLY,
|
||||
NULL);
|
||||
ret = nx_mount(devname, CONFIG_EA3131_PAGING_MOUNTPT, "vfat",
|
||||
MS_RDONLY, NULL);
|
||||
DEBUGASSERT(ret == OK);
|
||||
|
||||
#endif /* CONFIG_EA3131_PAGING_SDSLOT */
|
||||
|
||||
/* Open the selected path for read-only access */
|
||||
|
||||
g_pgsrc.fd = nx_open(CONFIG_PAGING_BINPATH, O_RDONLY);
|
||||
DEBUGASSERT(g_pgsrc.fd >= 0);
|
||||
file_open(&g_pgsrc.file, CONFIG_PAGING_BINPATH, O_RDONLY);
|
||||
DEBUGASSERT(g_pgsrc.file.f_inode != NULL);
|
||||
|
||||
/* Then we are initialized */
|
||||
|
||||
@ -443,12 +443,12 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage)
|
||||
|
||||
/* Seek to that position */
|
||||
|
||||
pos = nx_seek(g_pgsrc.fd, offset, SEEK_SET);
|
||||
pos = file_seek(&g_pgsrc.file, offset, SEEK_SET);
|
||||
DEBUGASSERT(pos != (off_t)-1);
|
||||
|
||||
/* And read the page data from that offset */
|
||||
|
||||
nbytes = nx_read(g_pgsrc.fd, vpage, PAGESIZE);
|
||||
nbytes = file_read(&g_pgsrc.file, vpage, PAGESIZE);
|
||||
DEBUGASSERT(nbytes == PAGESIZE);
|
||||
return OK;
|
||||
|
||||
|
@ -182,7 +182,7 @@
|
||||
struct pg_source_s
|
||||
{
|
||||
bool initialized; /* TRUE: we are initialized */
|
||||
int fd; /* File descriptor of the nuttx.bin file */
|
||||
struct file file; /* File descriptor of the nuttx.bin file */
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -272,16 +272,16 @@ static inline void lpc31_initsrc(void)
|
||||
/* Now mount the file system */
|
||||
|
||||
snprintf(devname, 16, "/dev/mmcsd%d", CONFIG_EA3152_PAGING_MINOR);
|
||||
ret = mount(devname, CONFIG_EA3152_PAGING_MOUNTPT, "vfat", MS_RDONLY,
|
||||
NULL);
|
||||
ret = nx_mount(devname, CONFIG_EA3152_PAGING_MOUNTPT, "vfat",
|
||||
MS_RDONLY, NULL);
|
||||
DEBUGASSERT(ret == OK);
|
||||
|
||||
#endif /* CONFIG_EA3152_PAGING_SDSLOT */
|
||||
|
||||
/* Open the selected path for read-only access */
|
||||
|
||||
g_pgsrc.fd = nx_open(CONFIG_PAGING_BINPATH, O_RDONLY);
|
||||
DEBUGASSERT(g_pgsrc.fd >= 0);
|
||||
file_open(&g_pgsrc.file, CONFIG_PAGING_BINPATH, O_RDONLY);
|
||||
DEBUGASSERT(g_pgsrc.file.f_inode != NULL);
|
||||
|
||||
/* Then we are initialized */
|
||||
|
||||
@ -444,12 +444,12 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage)
|
||||
|
||||
/* Seek to that position */
|
||||
|
||||
pos = nx_seek(g_pgsrc.fd, offset, SEEK_SET);
|
||||
pos = file_seek(&g_pgsrc.file, offset, SEEK_SET);
|
||||
DEBUGASSERT(pos != (off_t)-1);
|
||||
|
||||
/* And read the page data from that offset */
|
||||
|
||||
nbytes = nx_read(g_pgsrc.fd, vpage, PAGESIZE);
|
||||
nbytes = file_read(&g_pgsrc.file, vpage, PAGESIZE);
|
||||
DEBUGASSERT(nbytes == PAGESIZE);
|
||||
return OK;
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
# include "lpc43_spifi.h"
|
||||
|
||||
# ifdef CONFIG_SPFI_NXFFS
|
||||
# include <sys/mount.h>
|
||||
# include <nuttx/fs/fs.h>
|
||||
# include <nuttx/fs/nxffs.h>
|
||||
# endif
|
||||
#endif
|
||||
@ -125,10 +125,10 @@ static int nsh_spifi_initialize(void)
|
||||
|
||||
/* Mount the file system at /mnt/spifi */
|
||||
|
||||
ret = mount(NULL, "/mnt/spifi", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
# include "lpc43_spifi.h"
|
||||
|
||||
# ifdef CONFIG_SPFI_NXFFS
|
||||
# include <sys/mount.h>
|
||||
# include <nuttx/fs/fs.h>
|
||||
# include <nuttx/fs/nxffs.h>
|
||||
# endif
|
||||
#endif
|
||||
@ -116,10 +116,10 @@ static int nsh_spifi_initialize(void)
|
||||
|
||||
/* Mount the file system at /mnt/spifi */
|
||||
|
||||
ret = mount(NULL, "/mnt/spifi", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
# include "lpc43_spifi.h"
|
||||
|
||||
# ifdef CONFIG_SPFI_NXFFS
|
||||
# include <sys/mount.h>
|
||||
# include <nuttx/fs/fs.h>
|
||||
# include <nuttx/fs/nxffs.h>
|
||||
# endif
|
||||
#endif
|
||||
@ -116,10 +116,10 @@ static int nsh_spifi_initialize(void)
|
||||
|
||||
/* Mount the file system at /mnt/spifi */
|
||||
|
||||
ret = mount(NULL, "/mnt/spifi", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
# include <nuttx/video/fb.h>
|
||||
#endif
|
||||
@ -95,7 +96,7 @@ int lpc54_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "max32660-evsys.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -87,7 +88,7 @@ int max326_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <syslog.h>
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
#include <sys/mount.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NRF52_WDT
|
||||
@ -66,7 +66,7 @@ int nrf52_bringup(void)
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NRF52_WDT
|
||||
|
@ -26,7 +26,8 @@
|
||||
|
||||
#include <debug.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "rp2040_pico.h"
|
||||
|
||||
@ -45,7 +46,7 @@ int rp2040_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("ERROR: Failed to mount procfs at %s: %d\n", "/proc", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_BUTTONS
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
@ -108,7 +109,7 @@ int s32k1xx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_BUTTONS
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
@ -108,7 +109,7 @@ int s32k1xx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_BUTTONS
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
@ -102,7 +103,7 @@ int s32k1xx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_BUTTONS
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
@ -107,7 +108,7 @@ int s32k1xx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_BUTTONS
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
@ -107,7 +108,7 @@ int s32k1xx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_BUTTONS
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
@ -106,7 +107,7 @@ int s32k1xx_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -39,11 +39,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "arduino-due.h"
|
||||
|
||||
@ -97,7 +97,7 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n",
|
||||
|
@ -39,11 +39,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "flipnclick-sam3x.h"
|
||||
|
||||
@ -76,7 +76,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n",
|
||||
|
@ -40,11 +40,12 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -64,7 +65,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -48,6 +46,7 @@
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "sam_spi.h"
|
||||
@ -125,10 +124,10 @@ int sam_at25_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/at25 */
|
||||
|
||||
ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -50,6 +48,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_CDCACM
|
||||
# include <nuttx/usb/cdcacm.h>
|
||||
@ -108,8 +107,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to create the CDC/ACM serial device: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to create the CDC/ACM serial device: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -118,9 +116,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
ret = sam_nand_automount(SAM_SMC_CS0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to initialize the NAND: %d (%d)\n",
|
||||
ret, errno);
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize the NAND: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -133,9 +129,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
ret = sam_hsmci_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: sam_hsmci_initialize() failed: %d (%d)\n",
|
||||
ret, errno);
|
||||
syslog(LOG_ERR, "ERROR: sam_hsmci_initialize() failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -145,12 +139,11 @@ int board_app_initialize(uintptr_t arg)
|
||||
|
||||
syslog(LOG_INFO, "Mounting procfs to /proc\n");
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to mount the PROC filesystem: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -158,12 +151,11 @@ int board_app_initialize(uintptr_t arg)
|
||||
#if HAVE_HSMCI
|
||||
syslog(LOG_INFO, "Mounting /dev/mmcsd0 to /fat\n");
|
||||
|
||||
ret = mount("/dev/mmcsd0", "/fat", "vfat", 0, NULL);
|
||||
ret = nx_mount("/dev/mmcsd0", "/fat", "vfat", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the FAT filesystem: %d (%d)\n",
|
||||
ret, errno);
|
||||
"ERROR: Failed to mount the FAT filesystem: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -174,8 +166,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
ret = sam_sdinitialize(0, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n",
|
||||
ret);
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -187,8 +178,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
ret = usbmonitor_start();
|
||||
if (ret != OK)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to start USB monitor: %d (%d)\n", ret, errno);
|
||||
syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -24,13 +24,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
@ -226,10 +226,10 @@ int sam_nand_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/nand */
|
||||
|
||||
ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -114,7 +114,7 @@ static int wdog_daemon(int argc, char *argv[])
|
||||
ret = file_ioctl(&filestruct, WDIOC_START, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: ioctl(WDIOC_START) failed: %d\n", errno);
|
||||
wderr("ERROR: file_ioctl(WDIOC_START) failed: %d\n", ret);
|
||||
goto errout_with_dev;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ static int wdog_daemon(int argc, char *argv[])
|
||||
ret = file_ioctl(&filestruct, WDIOC_KEEPALIVE, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: ioctl(WDIOC_KEEPALIVE) failed: %d\n", errno);
|
||||
wderr("ERROR: file_ioctl(WDIOC_KEEPALIVE) failed: %d\n", ret);
|
||||
goto errout_with_dev;
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,7 @@ int sam_watchdog_initialize(void)
|
||||
(unsigned long)CONFIG_WDT_TIMEOUT);
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: ioctl(WDIOC_SETTIMEOUT) failed: %d\n", errno);
|
||||
wderr("ERROR: file_ioctl(WDIOC_SETTIMEOUT) failed: %d\n", ret);
|
||||
goto errout_with_dev;
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ int sam_watchdog_initialize(void)
|
||||
(unsigned long)CONFIG_WDT_MINTIME);
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: ioctl(WDIOC_MINTIME) failed: %d\n", errno);
|
||||
wderr("ERROR: file_ioctl(WDIOC_MINTIME) failed: %d\n", ret);
|
||||
goto errout_with_dev;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
@ -171,15 +172,15 @@ static int nsh_sdmmc_initialize(void)
|
||||
#ifdef CONFIG_SAMA5D27_SDMMC0_MOUNT
|
||||
/* Mount the volume on SDMMC0 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D27_SDMMC0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D27_SDMMC0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
mcerr("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@ -207,15 +208,15 @@ static int nsh_sdmmc_initialize(void)
|
||||
#ifdef CONFIG_SAMA5D27_SDMMC1_MOUNT
|
||||
/* Mount the volume on SDMMC1 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D27_SDMMC1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D27_SDMMC1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
mcerr("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@ -274,14 +275,14 @@ int sam_bringup(void)
|
||||
{
|
||||
/* Mount the file system */
|
||||
|
||||
ret = mount(CONFIG_GIANT_BOARD_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_GIANT_BOARD_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(CONFIG_GIANT_BOARD_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_GIANT_BOARD_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
fserr("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
fserr("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
CONFIG_GIANT_BOARD_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_GIANT_BOARD_ROMFS_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_GIANT_BOARD_ROMFS_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -361,7 +362,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -24,8 +24,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -33,6 +31,7 @@
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "sam_spi.h"
|
||||
@ -109,10 +108,10 @@ int sam_at25_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/at25 */
|
||||
|
||||
ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
@ -172,15 +173,15 @@ static int nsh_sdmmc_initialize(void)
|
||||
#ifdef CONFIG_SAMA5D27_SDMMC0_MOUNT
|
||||
/* Mount the volume on SDMMC0 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D27_SDMMC0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D27_SDMMC0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@ -208,15 +209,15 @@ static int nsh_sdmmc_initialize(void)
|
||||
#ifdef CONFIG_SAMA5D27_SDMMC1_MOUNT
|
||||
/* Mount the volume on SDMMC1 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D27_SDMMC1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D27_SDMMC1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@ -275,15 +276,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -306,15 +307,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI1 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_HSMCI1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_HSMCI1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -341,14 +342,14 @@ int sam_bringup(void)
|
||||
{
|
||||
/* Mount the file system */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
_err("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -428,7 +429,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -24,13 +24,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "arm_arch.h"
|
||||
@ -192,10 +192,10 @@ int sam_nand_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/nand */
|
||||
|
||||
ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -48,6 +46,7 @@
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "sam_spi.h"
|
||||
@ -124,10 +123,10 @@ int sam_at25_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/at25 */
|
||||
|
||||
ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -46,6 +46,8 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
# include <nuttx/usb/usbmonitor.h>
|
||||
#endif
|
||||
@ -176,15 +178,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -207,15 +209,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI1 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_HSMCI1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_HSMCI1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -242,14 +244,14 @@ int sam_bringup(void)
|
||||
{
|
||||
/* Mount the file system */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
_err("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -329,7 +331,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -46,13 +46,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "arm_arch.h"
|
||||
@ -213,10 +213,10 @@ int sam_nand_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/nand */
|
||||
|
||||
ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -39,14 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
# include <nuttx/usb/usbmonitor.h>
|
||||
@ -227,7 +226,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -57,8 +57,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -66,6 +64,7 @@
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "sam_twi.h"
|
||||
@ -147,10 +146,10 @@ int sam_at24_automount(int minor)
|
||||
/* Mount the file system at /mnt/at24 */
|
||||
|
||||
finfo("Mount the NXFFS file system at /dev/at24\n");
|
||||
ret = mount(NULL, "/mnt/at24", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at24", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -48,6 +46,7 @@
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "sam_spi.h"
|
||||
@ -125,10 +124,10 @@ int sam_at25_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/at25 */
|
||||
|
||||
ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -46,13 +46,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "arm_arch.h"
|
||||
@ -213,10 +213,10 @@ int sam_nand_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/nand */
|
||||
|
||||
ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -145,7 +145,7 @@ int at25_main(int argc, char *argv)
|
||||
fd = open(g_at25dev, O_WRONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
int errcode = errno;
|
||||
fprintf(stderr, "ERROR: Failed to open %s: %d\n", g_at25dev, errcode);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -206,7 +206,7 @@ int at25_main(int argc, char *argv)
|
||||
nwritten = write(fd, src, memoutstream.public.nput);
|
||||
if (nwritten <= 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
int errcode = errno;
|
||||
if (errno != EINTR)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Write failed: %d\n", errcode);
|
||||
@ -236,7 +236,7 @@ int at25_main(int argc, char *argv)
|
||||
fd = open(g_at25dev, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
int errcode = errno;
|
||||
fprintf(stderr, "ERROR: Failed to open %s: %d\n", g_at25dev, errcode);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -255,7 +255,7 @@ int at25_main(int argc, char *argv)
|
||||
nread = read(fd, g_iobuffer, rdsize);
|
||||
if (nread <= 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
int errcode = errno;
|
||||
if (errno != EINTR)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Read failed: %d\n", errcode);
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -48,6 +46,7 @@
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
#include <nuttx/drivers/drivers.h>
|
||||
|
||||
@ -154,10 +153,10 @@ int sam_at25_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/at25 */
|
||||
|
||||
ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at25", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,8 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
# include <nuttx/usb/usbmonitor.h>
|
||||
#endif
|
||||
@ -191,15 +193,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -222,15 +224,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI1 */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_HSMCI1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_HSMCI1_MOUNT_BLKDEV,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -257,14 +259,14 @@ int sam_bringup(void)
|
||||
{
|
||||
/* Mount the file system */
|
||||
|
||||
ret = mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
_err("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -344,7 +346,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -46,13 +46,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "arm_arch.h"
|
||||
@ -213,10 +213,10 @@ int sam_nand_automount(int minor)
|
||||
|
||||
/* Mount the file system at /mnt/nand */
|
||||
|
||||
ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/nand", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -24,8 +24,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -33,6 +31,7 @@
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
|
||||
#include "metro-m4.h"
|
||||
@ -106,11 +105,11 @@ int sam_at24_automount(int minor)
|
||||
/* Mount the file system at /mnt/at24 */
|
||||
|
||||
finfo("Mount the NXFFS file system at /dev/at24\n");
|
||||
ret = mount(NULL, "/mnt/at24", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/at24", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n",
|
||||
errno);
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
@ -51,6 +50,8 @@
|
||||
#include "sam_wdt.h"
|
||||
#endif
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_SAMD5E5_SERCOM5_ISI2C
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include "hardware/sam_i2c_master.h"
|
||||
@ -100,7 +101,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
@ -154,7 +155,7 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the file system at /mnt/nvm */
|
||||
|
||||
ret = mount("/dev/smart0", "/mnt/nvm", "smartfs", 0, NULL);
|
||||
ret = nx_mount("/dev/smart0", "/mnt/nvm", "smartfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount the SmartFS volume: %d\n",
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <sched.h>
|
||||
|
@ -39,12 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "same54-xplained-pro.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -78,7 +79,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslot(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -53,6 +53,7 @@
|
||||
|
||||
#include <nuttx/drivers/drivers.h>
|
||||
#include <nuttx/drivers/ramdisk.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
@ -177,7 +178,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAME70_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAME70_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
@ -214,15 +215,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,14 +250,14 @@ int sam_bringup(void)
|
||||
{
|
||||
/* Mount the file system */
|
||||
|
||||
ret = mount(CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAME70XPLAINED_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAME70XPLAINED_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
syslog(LOG_ERR, "ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAME70XPLAINED_ROMFS_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAME70XPLAINED_ROMFS_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
# include <nuttx/usb/usbmonitor.h>
|
||||
#endif
|
||||
@ -285,7 +287,7 @@ int sam_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
@ -322,15 +324,15 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the volume on HSMCI0 */
|
||||
|
||||
ret = mount(CONFIG_SAMV71XULT_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMV71XULT_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
ret = nx_mount(CONFIG_SAMV71XULT_HSMCI0_MOUNT_BLKDEV,
|
||||
CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT,
|
||||
CONFIG_SAMV71XULT_HSMCI0_MOUNT_FSTYPE,
|
||||
0, NULL);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount %s: %d\n",
|
||||
CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -357,14 +359,14 @@ int sam_bringup(void)
|
||||
{
|
||||
/* Mount the file system */
|
||||
|
||||
ret = mount(CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
syslog(LOG_ERR, "ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME,
|
||||
CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT, errno);
|
||||
CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -409,11 +411,11 @@ int sam_bringup(void)
|
||||
|
||||
/* Mount the file system at /mnt/s25fl1 */
|
||||
|
||||
ret = mount(NULL, "/mnt/s25fl1", "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/mnt/s25fl1", "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount the NXFFS volume: %d\n",
|
||||
errno);
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -990,7 +990,7 @@ static int sam_lcd_dmawait(FAR struct sam_dev_s *priv, uint32_t timeout)
|
||||
sam_lcd_dmatimeout, (wdparm_t)priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
lcderr("ERROR: wd_start failed: %d\n", errno);
|
||||
lcderr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
|
||||
/* Loop until the event (or the timeout occurs). */
|
||||
|
@ -39,12 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
# include <nuttx/usb/usbmonitor.h>
|
||||
#endif
|
||||
@ -179,7 +180,7 @@ int stm32_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "failed to mount procfs at %s %d\n",
|
||||
|
@ -39,13 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/input/buttons.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
@ -95,7 +95,7 @@ int stm32_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -50,6 +48,7 @@
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
# include <nuttx/spi/spi.h>
|
||||
# include <nuttx/mtd/mtd.h>
|
||||
# include <nuttx/fs/fs.h>
|
||||
# include <nuttx/fs/nxffs.h>
|
||||
#endif
|
||||
|
||||
@ -142,10 +141,10 @@ int stm32_w25initialize(int minor)
|
||||
/* Mount the file system at /mnt/w25 */
|
||||
|
||||
snprintf(devname, 12, "/mnt/w25%c", 'a' + minor);
|
||||
ret = mount(NULL, devname, "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, devname, "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
@ -49,6 +47,7 @@
|
||||
#ifdef CONFIG_STM32_SPI1
|
||||
# include <nuttx/spi/spi.h>
|
||||
# include <nuttx/mtd/mtd.h>
|
||||
# include <nuttx/fs/fs.h>
|
||||
# include <nuttx/fs/nxffs.h>
|
||||
#endif
|
||||
|
||||
@ -141,10 +140,10 @@ int stm32_w25initialize(int minor)
|
||||
/* Mount the file system at /mnt/w25 */
|
||||
|
||||
snprintf(devname, 12, "/mnt/w25%c", 'a' + minor);
|
||||
ret = mount(NULL, devname, "nxffs", 0, NULL);
|
||||
ret = nx_mount(NULL, devname, "nxffs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
|
||||
ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -39,9 +39,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "stm32.h"
|
||||
#include "nucleo-f412zg.h"
|
||||
|
||||
@ -87,7 +88,7 @@ int stm32_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -25,11 +25,11 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <debug.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "nucleo-144.h"
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/leds/userled.h>
|
||||
#ifdef CONFIG_STM32_ROMFS
|
||||
#include "stm32_romfs.h"
|
||||
@ -71,7 +71,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -361,7 +361,7 @@ int stm32_bbsram_int(void)
|
||||
syslog(LOG_INFO, "Fault Logged on %s - Valid\n", buf);
|
||||
}
|
||||
|
||||
rv = unlink(HARDFAULT_PATH);
|
||||
rv = nx_unlink(HARDFAULT_PATH);
|
||||
if (rv < 0)
|
||||
{
|
||||
syslog(LOG_INFO, "stm32 bbsram: Failed to unlink Fault Log file"
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/drivers/ramdisk.h>
|
||||
#include "stm32_romfs.h"
|
||||
|
||||
@ -126,12 +127,12 @@ int stm32_romfs_initialize(void)
|
||||
finfo("Mounting ROMFS filesystem at target=%s with source=%s\n",
|
||||
CONFIG_STM32_ROMFS_MOUNTPOINT, MOUNT_DEVNAME);
|
||||
|
||||
ret = mount(MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT, errno);
|
||||
ferr("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/leds/userled.h>
|
||||
|
||||
#include "nucleo-l152re.h"
|
||||
@ -95,7 +95,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(0, STM32_PROCFS_MOUNTPOINT, "procfs", 0, 0);
|
||||
ret = nx_mount(0, STM32_PROCFS_MOUNTPOINT, "procfs", 0, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -39,13 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/input/buttons.h>
|
||||
|
||||
@ -106,7 +106,7 @@ int stm32_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -41,12 +41,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USBMONITOR
|
||||
# include <nuttx/usb/usbmonitor.h>
|
||||
#endif
|
||||
@ -271,7 +272,7 @@ int stm32_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("ERROR: Failed to mount procfs at %s: %d\n",
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/drivers/ramdisk.h>
|
||||
#include "stm32_romfs.h"
|
||||
|
||||
@ -141,12 +142,12 @@ int stm32_romfs_initialize(void)
|
||||
finfo("Mounting ROMFS filesystem at target=%s with source=%s\n",
|
||||
CONFIG_STM32_ROMFS_MOUNTPOINT, MOUNT_DEVNAME);
|
||||
|
||||
ret = mount(MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
ret = nx_mount(MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT,
|
||||
"romfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT, errno);
|
||||
ferr("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
|
||||
MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -40,12 +40,12 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/input/buttons.h>
|
||||
#include <nuttx/leds/userled.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
@ -78,7 +78,7 @@ int stm32_bringup(void)
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
|
@ -110,8 +110,8 @@ int stm32_rgbled_setup(void)
|
||||
struct pwm_lowerhalf_s *ledr;
|
||||
struct pwm_lowerhalf_s *ledg;
|
||||
struct pwm_lowerhalf_s *ledb;
|
||||
struct file file;
|
||||
int ret;
|
||||
int fd;
|
||||
|
||||
/* Have we already initialized? */
|
||||
|
||||
@ -165,17 +165,17 @@ int stm32_rgbled_setup(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
fd = nx_open("/dev/rgbled0", O_WRONLY);
|
||||
if (fd < 0)
|
||||
ret = file_open(&file, "/dev/rgbled0", O_WRONLY);
|
||||
if (ret < 0)
|
||||
{
|
||||
lederr("ERROR: open failed: %d\n", fd);
|
||||
lederr("ERROR: open failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Initialize led off */
|
||||
|
||||
nx_write(fd, "#000000", 8);
|
||||
nx_close(fd);
|
||||
file_write(&file, "#000000", 8);
|
||||
file_close(&file);
|
||||
|
||||
/* Now we are initialized */
|
||||
|
||||
|
@ -82,7 +82,7 @@ static int wdog_daemon(int argc, char *argv[])
|
||||
ret = file_ioctl(&filestruct, WDIOC_START, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: ioctl(WDIOC_START) failed: %d\n", errno);
|
||||
wderr("ERROR: file_ioctl(WDIOC_START) failed: %d\n", ret);
|
||||
goto exit_close_dev;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ static int wdog_daemon(int argc, char *argv[])
|
||||
ret = file_ioctl(&filestruct, WDIOC_KEEPALIVE, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: ioctl(WDIOC_KEEPALIVE) failed: %d\n", errno);
|
||||
wderr("ERROR: file_ioctl(WDIOC_KEEPALIVE) failed: %d\n", ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -150,7 +150,7 @@ int photon_watchdog_initialize(void)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
wderr("ERROR: watchdog configuration failed: %d\n", errno);
|
||||
wderr("ERROR: watchdog configuration failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user