summaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_mntcmds.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-07 01:52:30 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-07 01:52:30 +0000
commitce376ed9e145fe7b9c0215e93bfebf0893ecf7b3 (patch)
tree425cec7640f89663994f2a3646ca35e54db91df6 /apps/nshlib/nsh_mntcmds.c
parent5332fb0e659549272ed5527c26964b22d31da3bc (diff)
downloadpx4-nuttx-ce376ed9e145fe7b9c0215e93bfebf0893ecf7b3.tar.gz
px4-nuttx-ce376ed9e145fe7b9c0215e93bfebf0893ecf7b3.tar.bz2
px4-nuttx-ce376ed9e145fe7b9c0215e93bfebf0893ecf7b3.zip
More LPC1788 changes from Rommel Marcelo + a few kernel build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5715 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib/nsh_mntcmds.c')
-rw-r--r--apps/nshlib/nsh_mntcmds.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c
index f8e3a142a..8e62229fa 100644
--- a/apps/nshlib/nsh_mntcmds.c
+++ b/apps/nshlib/nsh_mntcmds.c
@@ -1,7 +1,7 @@
/****************************************************************************
* apps/nshlib/nsh_mntcmds.c
*
- * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -107,6 +107,7 @@ static int df_handler(FAR const char *mountpoint,
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) && \
defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_MOUNT)
+#ifndef CONFIG_NUTTX_KERNEL
static int mount_handler(FAR const char *mountpoint,
FAR struct statfs *statbuf, FAR void *arg)
{
@@ -158,6 +159,7 @@ static int mount_handler(FAR const char *mountpoint,
return OK;
}
#endif
+#endif
/****************************************************************************
* Name: mount_show
@@ -165,11 +167,13 @@ static int mount_handler(FAR const char *mountpoint,
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) && \
defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_MOUNT)
+#ifndef CONFIG_NUTTX_KERNEL
static inline int mount_show(FAR struct nsh_vtbl_s *vtbl, FAR const char *progname)
{
return foreach_mountpoint(mount_handler, (FAR void *)vtbl);
}
#endif
+#endif
/****************************************************************************
* Public Functions
@@ -209,10 +213,12 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* The mount command behaves differently if no parameters are provided */
+#ifndef CONFIG_NUTTX_KERNEL
if (argc < 2)
{
return mount_show(vtbl, argv[0]);
}
+#endif
/* Get the mount options. NOTE: getopt() is not thread safe nor re-entrant.
* To keep its state proper for the next usage, it is necessary to parse to