summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-31 17:34:44 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-31 17:34:44 -0600
commitf8d20db23e41f2cb8f1e99f8f4f7965c215c9677 (patch)
tree45c7a57c201427409d0f4b78c803d6e240f79f43 /nuttx/fs
parent306de6c62392400107ea8a9d6e3aa13dd202b742 (diff)
downloadpx4-nuttx-f8d20db23e41f2cb8f1e99f8f4f7965c215c9677.tar.gz
px4-nuttx-f8d20db23e41f2cb8f1e99f8f4f7965c215c9677.tar.bz2
px4-nuttx-f8d20db23e41f2cb8f1e99f8f4f7965c215c9677.zip
Reanem kzalloc to kmm_zalloc for consistency
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fat/fs_fat32.c4
-rw-r--r--nuttx/fs/fs_automount.c2
-rw-r--r--nuttx/fs/fs_inodereserve.c2
-rw-r--r--nuttx/fs/fs_select.c2
-rw-r--r--nuttx/fs/nfs/nfs_vfsops.c6
-rw-r--r--nuttx/fs/nfs/rpc_clnt.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_initialize.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_open.c4
-rw-r--r--nuttx/fs/procfs/fs_procfs.c4
-rw-r--r--nuttx/fs/procfs/fs_procfscpuload.c2
-rw-r--r--nuttx/fs/procfs/fs_procfsproc.c6
-rw-r--r--nuttx/fs/procfs/fs_procfsuptime.c2
-rw-r--r--nuttx/fs/procfs/fs_skeleton.c6
-rw-r--r--nuttx/fs/romfs/fs_romfs.c4
-rw-r--r--nuttx/fs/smartfs/smartfs_procfs.c6
-rw-r--r--nuttx/fs/smartfs/smartfs_smart.c2
16 files changed, 28 insertions, 28 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index 1302b6395..251d22836 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -306,7 +306,7 @@ static int fat_open(FAR struct file *filep, const char *relpath,
* file.
*/
- ff = (struct fat_file_s *)kzalloc(sizeof(struct fat_file_s));
+ ff = (struct fat_file_s *)kmm_zalloc(sizeof(struct fat_file_s));
if (!ff)
{
ret = -ENOMEM;
@@ -1756,7 +1756,7 @@ static int fat_bind(FAR struct inode *blkdriver, const void *data,
/* Create an instance of the mountpt state structure */
- fs = (struct fat_mountpt_s *)kzalloc(sizeof(struct fat_mountpt_s));
+ fs = (struct fat_mountpt_s *)kmm_zalloc(sizeof(struct fat_mountpt_s));
if (!fs)
{
return -ENOMEM;
diff --git a/nuttx/fs/fs_automount.c b/nuttx/fs/fs_automount.c
index ff40c9230..2dc9a9b7a 100644
--- a/nuttx/fs/fs_automount.c
+++ b/nuttx/fs/fs_automount.c
@@ -546,7 +546,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
/* Allocate an auto-mounter state structure */
priv = (FAR struct automounter_state_s *)
- kzalloc(sizeof(struct automounter_state_s));
+ kmm_zalloc(sizeof(struct automounter_state_s));
if (!priv)
{
diff --git a/nuttx/fs/fs_inodereserve.c b/nuttx/fs/fs_inodereserve.c
index 82d3e6f2d..2c13513a4 100644
--- a/nuttx/fs/fs_inodereserve.c
+++ b/nuttx/fs/fs_inodereserve.c
@@ -91,7 +91,7 @@ static void inode_namecpy(char *dest, const char *src)
static FAR struct inode *inode_alloc(FAR const char *name)
{
int namelen = inode_namelen(name);
- FAR struct inode *node = (FAR struct inode*)kzalloc(FSNODE_SIZE(namelen));
+ FAR struct inode *node = (FAR struct inode*)kmm_zalloc(FSNODE_SIZE(namelen));
if (node)
{
inode_namecpy(node->i_name, name);
diff --git a/nuttx/fs/fs_select.c b/nuttx/fs/fs_select.c
index 556591b9e..f862ade33 100644
--- a/nuttx/fs/fs_select.c
+++ b/nuttx/fs/fs_select.c
@@ -129,7 +129,7 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
/* Allocate the descriptor list for poll() */
- pollset = (struct pollfd *)kzalloc(npfds * sizeof(struct pollfd));
+ pollset = (struct pollfd *)kmm_zalloc(npfds * sizeof(struct pollfd));
if (!pollset)
{
set_errno(ENOMEM);
diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c
index 6654f3baf..362343d01 100644
--- a/nuttx/fs/nfs/nfs_vfsops.c
+++ b/nuttx/fs/nfs/nfs_vfsops.c
@@ -570,7 +570,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath,
/* Pre-allocate the file private data to describe the opened file. */
- np = (struct nfsnode *)kzalloc(sizeof(struct nfsnode));
+ np = (struct nfsnode *)kmm_zalloc(sizeof(struct nfsnode));
if (!np)
{
fdbg("ERROR: Failed to allocate private data\n");
@@ -1722,7 +1722,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data,
/* Create an instance of the mountpt state structure */
- nmp = (FAR struct nfsmount *)kzalloc(SIZEOF_nfsmount(buflen));
+ nmp = (FAR struct nfsmount *)kmm_zalloc(SIZEOF_nfsmount(buflen));
if (!nmp)
{
fdbg("ERROR: Failed to allocate mountpoint structure\n");
@@ -1772,7 +1772,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data,
/* Create an instance of the rpc state structure */
- rpc = (struct rpcclnt *)kzalloc(sizeof(struct rpcclnt));
+ rpc = (struct rpcclnt *)kmm_zalloc(sizeof(struct rpcclnt));
if (!rpc)
{
fdbg("ERROR: Failed to allocate rpc structure\n");
diff --git a/nuttx/fs/nfs/rpc_clnt.c b/nuttx/fs/nfs/rpc_clnt.c
index cdf3639fc..e19588404 100644
--- a/nuttx/fs/nfs/rpc_clnt.c
+++ b/nuttx/fs/nfs/rpc_clnt.c
@@ -396,7 +396,7 @@ int rpcclnt_connect(struct rpcclnt *rpc)
/* Create an instance of the socket state structure */
- so = (struct socket *)kzalloc(sizeof(struct socket));
+ so = (struct socket *)kmm_zalloc(sizeof(struct socket));
if (!so)
{
fdbg("ERROR: Failed to allocate socket structure\n");
diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c
index 2aace3a7b..3fb9e2b77 100644
--- a/nuttx/fs/nxffs/nxffs_initialize.c
+++ b/nuttx/fs/nxffs/nxffs_initialize.c
@@ -175,7 +175,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd)
/* Allocate a NXFFS volume structure */
- volume = (FAR struct nxffs_volume_s *)kzalloc(sizeof(struct nxffs_volume_s));
+ volume = (FAR struct nxffs_volume_s *)kmm_zalloc(sizeof(struct nxffs_volume_s));
if (!volume)
{
return -ENOMEM;
diff --git a/nuttx/fs/nxffs/nxffs_open.c b/nuttx/fs/nxffs/nxffs_open.c
index d049ef693..07e115a15 100644
--- a/nuttx/fs/nxffs/nxffs_open.c
+++ b/nuttx/fs/nxffs/nxffs_open.c
@@ -514,7 +514,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
wrfile = &g_wrfile;
memset(wrfile, 0, sizeof(struct nxffs_wrfile_s));
#else
- wrfile = (FAR struct nxffs_wrfile_s *)kzalloc(sizeof(struct nxffs_wrfile_s));
+ wrfile = (FAR struct nxffs_wrfile_s *)kmm_zalloc(sizeof(struct nxffs_wrfile_s));
if (!wrfile)
{
ret = -ENOMEM;
@@ -750,7 +750,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume,
{
/* Not already open.. create a new open structure */
- ofile = (FAR struct nxffs_ofile_s *)kzalloc(sizeof(struct nxffs_ofile_s));
+ ofile = (FAR struct nxffs_ofile_s *)kmm_zalloc(sizeof(struct nxffs_ofile_s));
if (!ofile)
{
fdbg("ERROR: ofile allocation failed\n");
diff --git a/nuttx/fs/procfs/fs_procfs.c b/nuttx/fs/procfs/fs_procfs.c
index 3351d7bf8..d4471e554 100644
--- a/nuttx/fs/procfs/fs_procfs.c
+++ b/nuttx/fs/procfs/fs_procfs.c
@@ -435,7 +435,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
*/
level0 = (FAR struct procfs_level0_s *)
- kzalloc(sizeof(struct procfs_level0_s));
+ kmm_zalloc(sizeof(struct procfs_level0_s));
if (!level0)
{
@@ -514,7 +514,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
*/
level1 = (FAR struct procfs_level1_s *)
- kzalloc(sizeof(struct procfs_level1_s));
+ kmm_zalloc(sizeof(struct procfs_level1_s));
if (!level1)
{
diff --git a/nuttx/fs/procfs/fs_procfscpuload.c b/nuttx/fs/procfs/fs_procfscpuload.c
index 9d01bcad3..8641f3933 100644
--- a/nuttx/fs/procfs/fs_procfscpuload.c
+++ b/nuttx/fs/procfs/fs_procfscpuload.c
@@ -166,7 +166,7 @@ static int cpuload_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the file attributes */
- attr = (FAR struct cpuload_file_s *)kzalloc(sizeof(struct cpuload_file_s));
+ attr = (FAR struct cpuload_file_s *)kmm_zalloc(sizeof(struct cpuload_file_s));
if (!attr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
diff --git a/nuttx/fs/procfs/fs_procfsproc.c b/nuttx/fs/procfs/fs_procfsproc.c
index 15625c22a..cd3976286 100644
--- a/nuttx/fs/procfs/fs_procfsproc.c
+++ b/nuttx/fs/procfs/fs_procfsproc.c
@@ -978,7 +978,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and node selection */
- procfile = (FAR struct proc_file_s *)kzalloc(sizeof(struct proc_file_s));
+ procfile = (FAR struct proc_file_s *)kmm_zalloc(sizeof(struct proc_file_s));
if (!procfile)
{
fdbg("ERROR: Failed to allocate file container\n");
@@ -1197,11 +1197,11 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
}
/* Allocate the directory structure. Note that the index and procentry
- * pointer are implicitly nullified by kzalloc(). Only the remaining,
+ * pointer are implicitly nullified by kmm_zalloc(). Only the remaining,
* non-zero entries will need be initialized.
*/
- procdir = (FAR struct proc_dir_s *)kzalloc(sizeof(struct proc_dir_s));
+ procdir = (FAR struct proc_dir_s *)kmm_zalloc(sizeof(struct proc_dir_s));
if (!procdir)
{
fdbg("ERROR: Failed to allocate the directory structure\n");
diff --git a/nuttx/fs/procfs/fs_procfsuptime.c b/nuttx/fs/procfs/fs_procfsuptime.c
index 2d1d02a25..0135e0717 100644
--- a/nuttx/fs/procfs/fs_procfsuptime.c
+++ b/nuttx/fs/procfs/fs_procfsuptime.c
@@ -168,7 +168,7 @@ static int uptime_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the file attributes */
- attr = (FAR struct uptime_file_s *)kzalloc(sizeof(struct uptime_file_s));
+ attr = (FAR struct uptime_file_s *)kmm_zalloc(sizeof(struct uptime_file_s));
if (!attr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
diff --git a/nuttx/fs/procfs/fs_skeleton.c b/nuttx/fs/procfs/fs_skeleton.c
index 28f5ff051..55a9d769e 100644
--- a/nuttx/fs/procfs/fs_skeleton.c
+++ b/nuttx/fs/procfs/fs_skeleton.c
@@ -179,7 +179,7 @@ static int skel_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and attribute selection */
- priv = (FAR struct skel_file_s *)kzalloc(sizeof(struct skel_file_s));
+ priv = (FAR struct skel_file_s *)kmm_zalloc(sizeof(struct skel_file_s));
if (!priv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -268,7 +268,7 @@ static int skel_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newpriv = (FAR struct skel_file_s *)kzalloc(sizeof(struct skel_file_s));
+ newpriv = (FAR struct skel_file_s *)kmm_zalloc(sizeof(struct skel_file_s));
if (!newpriv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -305,7 +305,7 @@ static int skel_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
*/
level1 = (FAR struct skel_level1_s *)
- kzalloc(sizeof(struct skel_level1_s));
+ kmm_zalloc(sizeof(struct skel_level1_s));
if (!level1)
{
diff --git a/nuttx/fs/romfs/fs_romfs.c b/nuttx/fs/romfs/fs_romfs.c
index cbc0cbe81..c4f41f2d2 100644
--- a/nuttx/fs/romfs/fs_romfs.c
+++ b/nuttx/fs/romfs/fs_romfs.c
@@ -226,7 +226,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath,
* file.
*/
- rf = (FAR struct romfs_file_s *)kzalloc(sizeof(struct romfs_file_s));
+ rf = (FAR struct romfs_file_s *)kmm_zalloc(sizeof(struct romfs_file_s));
if (!rf)
{
fdbg("Failed to allocate private data\n", ret);
@@ -916,7 +916,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data,
/* Create an instance of the mountpt state structure */
- rm = (FAR struct romfs_mountpt_s *)kzalloc(sizeof(struct romfs_mountpt_s));
+ rm = (FAR struct romfs_mountpt_s *)kmm_zalloc(sizeof(struct romfs_mountpt_s));
if (!rm)
{
fdbg("Failed to allocate mountpoint structure\n");
diff --git a/nuttx/fs/smartfs/smartfs_procfs.c b/nuttx/fs/smartfs/smartfs_procfs.c
index 8f8ff3d4f..a0950bc19 100644
--- a/nuttx/fs/smartfs/smartfs_procfs.c
+++ b/nuttx/fs/smartfs/smartfs_procfs.c
@@ -179,7 +179,7 @@ static int smartfs_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and attribute selection */
- priv = (FAR struct smartfs_file_s *)kzalloc(sizeof(struct smartfs_file_s));
+ priv = (FAR struct smartfs_file_s *)kmm_zalloc(sizeof(struct smartfs_file_s));
if (!priv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -268,7 +268,7 @@ static int smartfs_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newpriv = (FAR struct smartfs_file_s *)kzalloc(sizeof(struct smartfs_file_s));
+ newpriv = (FAR struct smartfs_file_s *)kmm_zalloc(sizeof(struct smartfs_file_s));
if (!newpriv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -305,7 +305,7 @@ static int smartfs_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
*/
level1 = (FAR struct smartfs_level1_s *)
- kzalloc(sizeof(struct smartfs_level1_s));
+ kmm_zalloc(sizeof(struct smartfs_level1_s));
if (!level1)
{
diff --git a/nuttx/fs/smartfs/smartfs_smart.c b/nuttx/fs/smartfs/smartfs_smart.c
index 5b967bb4a..d58c0f0e5 100644
--- a/nuttx/fs/smartfs/smartfs_smart.c
+++ b/nuttx/fs/smartfs/smartfs_smart.c
@@ -1337,7 +1337,7 @@ static int smartfs_bind(FAR struct inode *blkdriver, const void *data,
/* Create an instance of the mountpt state structure */
- fs = (struct smartfs_mountpt_s *)kzalloc(sizeof(struct smartfs_mountpt_s));
+ fs = (struct smartfs_mountpt_s *)kmm_zalloc(sizeof(struct smartfs_mountpt_s));
if (!fs)
{
return -ENOMEM;