diff options
author | px4dev <px4@purgatory.org> | 2013-01-23 18:58:19 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-23 18:58:19 -0800 |
commit | dc88dd0abb440b070e87337a7da6fd7a4c39311c (patch) | |
tree | 00260c9b8b5d6f20983f1ffbe211c39c87bd2b85 /nuttx/fs/fs_files.c | |
parent | d8a013f8720e81afb637b8206fbe521ccb43ac8f (diff) | |
parent | 1ce1d4460b1c7884490118ea356bf61ffbd31163 (diff) | |
download | px4-firmware-dc88dd0abb440b070e87337a7da6fd7a4c39311c.tar.gz px4-firmware-dc88dd0abb440b070e87337a7da6fd7a4c39311c.tar.bz2 px4-firmware-dc88dd0abb440b070e87337a7da6fd7a4c39311c.zip |
Merge branch 'master' into px4io-i2c
Diffstat (limited to 'nuttx/fs/fs_files.c')
-rw-r--r-- | nuttx/fs/fs_files.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/nuttx/fs/fs_files.c b/nuttx/fs/fs_files.c index 4da2d28a5..06addb1ef 100644 --- a/nuttx/fs/fs_files.c +++ b/nuttx/fs/fs_files.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fs_files.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 @@ -284,14 +284,6 @@ int files_dup(FAR struct file *filep1, FAR struct file *filep2) goto errout; } -#ifndef CONFIG_DISABLE_MOUNTPOINT - if (INODE_IS_MOUNTPT(filep1->f_inode)) - { - err = ENOSYS; /* Not yet supported */ - goto errout; - } -#endif - list = sched_getfiles(); if (!list) { @@ -331,18 +323,16 @@ int files_dup(FAR struct file *filep1, FAR struct file *filep2) if (inode->u.i_ops && inode->u.i_ops->open) { #ifndef CONFIG_DISABLE_MOUNTPOINT -#if 0 /* Not implemented */ if (INODE_IS_MOUNTPT(inode)) { - /* Open a file on the mountpoint */ + /* Dup the open file on the in the new file structure */ - ret = inode->u.i_mops->open(filep2, ?, filep2->f_oflags, ?); + ret = inode->u.i_mops->dup(filep1, filep2); } else #endif -#endif { - /* Open the pseudo file or device driver */ + /* (Re-)open the pseudo file or device driver */ ret = inode->u.i_ops->open(filep2); } |