1*41fbaed0Stron /* $NetBSD: dummy_write.c,v 1.1.1.1 2009/06/23 10:08:59 tron Exp $ */
2*41fbaed0Stron
3*41fbaed0Stron /*++
4*41fbaed0Stron /* NAME
5*41fbaed0Stron /* dummy_write 3
6*41fbaed0Stron /* SUMMARY
7*41fbaed0Stron /* dummy write operation
8*41fbaed0Stron /* SYNOPSIS
9*41fbaed0Stron /* #include <iostuff.h>
10*41fbaed0Stron /*
11*41fbaed0Stron /* ssize_t dummy_write(fd, buf, buf_len, timeout, context)
12*41fbaed0Stron /* int fd;
13*41fbaed0Stron /* void *buf;
14*41fbaed0Stron /* size_t len;
15*41fbaed0Stron /* int timeout;
16*41fbaed0Stron /* void *context;
17*41fbaed0Stron /* DESCRIPTION
18*41fbaed0Stron /* dummy_write() implements a data sink without side effects.
19*41fbaed0Stron /*
20*41fbaed0Stron /* Arguments:
21*41fbaed0Stron /* .IP fd
22*41fbaed0Stron /* File descriptor whose value is logged when verbose logging
23*41fbaed0Stron /* is turned on.
24*41fbaed0Stron /* .IP buf
25*41fbaed0Stron /* Write buffer pointer. Not used.
26*41fbaed0Stron /* .IP buf_len
27*41fbaed0Stron /* Write buffer size. Its value is logged when verbose logging is
28*41fbaed0Stron /* turned on.
29*41fbaed0Stron /* .IP timeout
30*41fbaed0Stron /* The deadline in seconds. Not used.
31*41fbaed0Stron /* .IP context
32*41fbaed0Stron /* Application context. Not used.
33*41fbaed0Stron /* DIAGNOSTICS
34*41fbaed0Stron /* None.
35*41fbaed0Stron /* LICENSE
36*41fbaed0Stron /* .ad
37*41fbaed0Stron /* .fi
38*41fbaed0Stron /* The Secure Mailer license must be distributed with this software.
39*41fbaed0Stron /* AUTHOR(S)
40*41fbaed0Stron /* Wietse Venema
41*41fbaed0Stron /* IBM T.J. Watson Research
42*41fbaed0Stron /* P.O. Box 704
43*41fbaed0Stron /* Yorktown Heights, NY 10598, USA
44*41fbaed0Stron /*--*/
45*41fbaed0Stron
46*41fbaed0Stron /* System library. */
47*41fbaed0Stron
48*41fbaed0Stron #include <sys_defs.h>
49*41fbaed0Stron
50*41fbaed0Stron /* Utility library. */
51*41fbaed0Stron
52*41fbaed0Stron #include <msg.h>
53*41fbaed0Stron #include <iostuff.h>
54*41fbaed0Stron
55*41fbaed0Stron /* dummy_write - dummy write operation */
56*41fbaed0Stron
dummy_write(int fd,void * unused_buf,size_t len,int unused_timeout,void * unused_context)57*41fbaed0Stron ssize_t dummy_write(int fd, void *unused_buf, size_t len,
58*41fbaed0Stron int unused_timeout, void *unused_context)
59*41fbaed0Stron {
60*41fbaed0Stron if (msg_verbose)
61*41fbaed0Stron msg_info("dummy_write: fd %d, len %lu", fd, (unsigned long) len);
62*41fbaed0Stron return (len);
63*41fbaed0Stron }
64