source: rtems/cpukit/libfs/src/devfs/devwrite.c @ 9b4422a2

4.11
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on May 3, 2012 at 3:09:24 PM

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 853 bytes
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in the file LICENSE in this distribution or at
4 *  http://www.rtems.com/license/LICENSE.
5 */
6
7#if HAVE_CONFIG_H
8#include "config.h"
9#endif
10
11#include <rtems.h>
12#include <rtems/io.h>
13
14#include "devfs.h"
15
16ssize_t devFS_write(
17  rtems_libio_t *iop,
18  const void    *buffer,
19  size_t         count
20)
21{
22  rtems_libio_rw_args_t   args;
23  rtems_status_code       status;
24  const devFS_node *np = iop->pathinfo.node_access;
25
26  args.iop         = iop;
27  args.offset      = iop->offset;
28  args.buffer      = (void *) buffer;
29  args.count       = count;
30  args.flags       = iop->flags;
31  args.bytes_moved = 0;
32
33  status = rtems_io_write(
34    np->major,
35    np->minor,
36    (void *) &args
37  );
38
39  if ( status )
40    return rtems_deviceio_errno(status);
41
42  return (ssize_t) args.bytes_moved;
43}
44
Note: See TracBrowser for help on using the repository browser.