forked from Imagelibrary/rtems
2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user