PR 1524/filesystem
	* libcsupport/src/rtems_mkdir.c: New file.
	* libcsupport/src/Makefile.am: Reflect change above.
	* libcsupport/include/rtems/libio.h: Added rtems_mkdir().
	* libmisc/fsmount/fsmount.h, libmisc/fsmount/fsmount.c,
	libblock/src/bdpart-mount.c, libnetworking/rtems/mkrootfs.h,
	libnetworking/rtems/mkrootfs.c, libfs/src/pipe/pipe.c: Use
	rtems_mkdir().  Removed rtems_fsmount_create_mount_point() and
	rtems_rootfs_mkdir().
This commit is contained in:
Sebastian Huber
2010-06-08 12:59:51 +00:00
parent 241f4c9637
commit eaee27b0b9
9 changed files with 35 additions and 200 deletions

View File

@@ -30,20 +30,11 @@ int pipe_create(
int filsdes[2]
)
{
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
/* FIXME: We should use a general mkdir function for this */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
!= 0) {
if (errno != ENOENT)
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];