mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 11:00:04 +08:00
e7e231e531
* dtable.cc (dtable::build_fhandler): Remove debugging output which uses 'cb'. * exec.cc (execvp): New function. (execvpe): Ditto. * fhandler.cc (fhandler_base::fhandler_base): Use constructor initialization. * fhandler.h (fhandler_tty_common::fhandler_tty_common): Ditto. * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard): Ditto. * fhandler_console.cc (fhandler_console::fhandler_console): Ditto. * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Ditto. * fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Ditto. (fhandler_tty_slave::fhandler_tty_slave): Ditto. (fhandler_pty_master::fhandler_pty_master): Ditto. * fhandler_windows.cc (fhandler_windows::fhandler_windows): Ditto.
61 lines
948 B
C++
61 lines
948 B
C++
/* fhandler_dev_zero.cc: code to access /dev/zero
|
|
|
|
Copyright 2000, 2001 Red Hat, Inc.
|
|
|
|
Written by DJ Delorie (dj@cygnus.com)
|
|
|
|
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 <errno.h>
|
|
#include "security.h"
|
|
#include "fhandler.h"
|
|
|
|
fhandler_dev_zero::fhandler_dev_zero ()
|
|
: fhandler_base (FH_ZERO)
|
|
{
|
|
}
|
|
|
|
int
|
|
fhandler_dev_zero::open (path_conv *, int flags, mode_t)
|
|
{
|
|
set_flags (flags);
|
|
set_open_status ();
|
|
return 1;
|
|
}
|
|
|
|
int
|
|
fhandler_dev_zero::write (const void *, size_t len)
|
|
{
|
|
return len;
|
|
}
|
|
|
|
int
|
|
fhandler_dev_zero::read (void *ptr, size_t len)
|
|
{
|
|
memset(ptr, 0, len);
|
|
return len;
|
|
}
|
|
|
|
off_t
|
|
fhandler_dev_zero::lseek (off_t, int)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
fhandler_dev_zero::close (void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
void
|
|
fhandler_dev_zero::dump ()
|
|
{
|
|
paranoid_printf("here, fhandler_dev_zero");
|
|
}
|