Welcome to mirror list, hosted at ThFree Co, Russian Federation.

null.cc « fhandler « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e4dec35e1154f1360030324e32126312c57ba4ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* null.cc.  /dev/null specifics.

This file is part of Cygwin.

This software is a copyrighted work licensed under the terms of the
Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
details. */

#include "winsup.h"
#include <unistd.h>
#include <stdlib.h>
#include <sys/uio.h>
#include <cygwin/acl.h>
#include <sys/param.h>
#include "cygerrno.h"
#include "perprocess.h"
#include "security.h"
#include "cygwin/version.h"
#include "path.h"
#include "fhandler.h"

fhandler_dev_null::fhandler_dev_null () :
	fhandler_base ()
{
}

ssize_t
fhandler_dev_null::write (const void *ptr, size_t len)
{
  /* Shortcut.  This also fixes a problem with the NUL device on x86_64:
     If you write > 4 GB in a single attempt, the bytes written returned
     from by is numBytes & 0xffffffff. */
  return len;
}