Changeset 44be50c in rtems
- Timestamp:
- 12/28/09 16:36:08 (13 years ago)
- Branches:
- 4.10, 4.11, 5, master
- Children:
- aea66e87
- Parents:
- e1ddc14b
- Location:
- cpukit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
re1ddc14b r44be50c 1 2009-12-28 Shrikant Gaikwad <n3oo3n@gmail.com> 2 3 * cpukit/libfs/src/pipe/pipe.c Restructured code to remove the 4 goto statements. 5 1 6 2009-12-21 Joel Sherrill <joel.sherrill@oarcorp.com> 2 7 -
cpukit/libcsupport/include/rtems/framebuffer.h
re1ddc14b r44be50c 33 33 * a frame buffer device driver. 34 34 */ 35 #define FRAME BUFFER_DRIVER_TABLE_ENTRY \35 #define FRAME_BUFFER_DRIVER_TABLE_ENTRY \ 36 36 { frame_buffer_initialize, frame_buffer_open, frame_buffer_close, \ 37 37 frame_buffer_read, frame_buffer_write, frame_buffer_control } -
cpukit/libfs/src/pipe/pipe.c
re1ddc14b r44be50c 29 29 rtems_libio_t *iop; 30 30 int err = 0; 31 32 31 /* Create /tmp if not exists */ 33 32 if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) … … 48 47 /* Try creating FIFO file until find an available file name */ 49 48 while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 50 if (errno != EEXIST) 49 if (errno != EEXIST){ 51 50 return -1; 51 } 52 52 /* Just try once... */ 53 53 return -1; … … 59 59 if (filsdes[0] < 0) { 60 60 err = errno; 61 goto out; 61 /* Delete file at errors, or else if pipe is successfully created 62 the file node will be deleted after it is closed by all. */ 63 unlink(fifopath); 64 } 65 else { 66 /* Reset open file to blocking mode */ 67 iop = rtems_libio_iop(filsdes[0]); 68 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 69 70 filsdes[1] = open(fifopath, O_WRONLY); 71 72 if (filsdes[1] < 0) { 73 err = errno; 74 close(filsdes[0]); 75 } 76 unlink(fifopath); 62 77 } 63 78 64 /* Reset open file to blocking mode */65 iop = rtems_libio_iop(filsdes[0]);66 iop->flags &= ~LIBIO_FLAGS_NO_DELAY;67 68 filsdes[1] = open(fifopath, O_WRONLY);69 70 if (filsdes[1] < 0) {71 err = errno;72 close(filsdes[0]);73 }74 75 out:76 /* Delete file at errors, or else if pipe is successfully created77 the file node will be deleted after it is closed by all. */78 unlink(fifopath);79 80 if (! err)81 return 0;82 79 rtems_set_errno_and_return_minus_one(err); 83 80 } 81
Note: See TracChangeset
for help on using the changeset viewer.