From 8ec7abb551a23bdf47509189145885a364810006 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 4 Mar 2010 06:36:51 +0000 Subject: 010-03-04 Chris Johns * libcsupport/include/rtems/libio.h, libcsupport/src/_rename_r.c: Add a rename file op and have rename use it. * libfs/Makefile.am, libfs/src/dosfs/msdos_rename.c, libfs/src/imfs/imfs_rename.c: New files to support the rename file op. * libfs/src/imfs/imfs.h: Add rename interface. * libfs/src/imfs/imfs_init.c: Add rename handler. * libfs/src/imfs/miniimfs_init.c: Fix up ops struct. * libfs/src/dosfs/msdos.h: Add msdos_rename and remove msdos_file_link. * libfs/src/dosfs/msdos_create.c: Remove the link call. * libfs/src/dosfs/msdos_eval.c: Fix a path parsing bug. * libfs/src/dosfs/msdos_init.c: Add rename handler and clean up the struct naming. * libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h: Change the link call to allow linking of directories if told to and change the unlink to handle unlink directories that are not empty so rename can be supported. * libfs/src/rfs/rtems-rfs-rtems-dir.c: Fix the link/unlink calls. * libfs/src/rfs/rtems-rfs-rtems.c: Add a rename handler. Fix the link/unlink calls. * libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_misc.c, httpd/asp.c, libfs/src/nfsclient/src/nfs.c: Work around a newlib warning when using the is*() family of calls. --- cpukit/libcsupport/include/rtems/libio.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpukit/libcsupport/include/rtems/libio.h') diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 0ee6ee8458..5cd6dc5a24 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -251,6 +251,13 @@ typedef int (*rtems_filesystem_readlink_t)( size_t bufsize ); +typedef int (*rtems_filesystem_rename_t)( + rtems_filesystem_location_info_t *old_parent_loc, /* IN */ + rtems_filesystem_location_info_t *old_loc, /* IN */ + rtems_filesystem_location_info_t *new_parent_loc, /* IN */ + const char *name /* IN */ +); + typedef int (*rtems_filesystem_statvfs_t)( rtems_filesystem_location_info_t *loc, /* IN */ struct statvfs *buf /* OUT */ @@ -280,6 +287,7 @@ struct _rtems_filesystem_operations_table { rtems_filesystem_evaluate_link_t eval_link_h; rtems_filesystem_symlink_t symlink_h; rtems_filesystem_readlink_t readlink_h; + rtems_filesystem_rename_t rename_h; rtems_filesystem_statvfs_t statvfs_h; }; -- cgit v1.2.3