[Midnightbsd-cvs] src [10507] trunk/lib/libc/sys/writev.c: update write

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jun 6 22:09:34 EDT 2018


Revision: 10507
          http://svnweb.midnightbsd.org/src/?rev=10507
Author:   laffer1
Date:     2018-06-06 22:09:33 -0400 (Wed, 06 Jun 2018)
Log Message:
-----------
update write

Modified Paths:
--------------
    trunk/lib/libc/sys/write.2

Added Paths:
-----------
    trunk/lib/libc/sys/write.c
    trunk/lib/libc/sys/writev.c

Property Changed:
----------------
    trunk/lib/libc/sys/write.2

Modified: trunk/lib/libc/sys/write.2
===================================================================
--- trunk/lib/libc/sys/write.2	2018-06-07 02:01:09 UTC (rev 10506)
+++ trunk/lib/libc/sys/write.2	2018-06-07 02:09:33 UTC (rev 10507)
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)write.2	8.5 (Berkeley) 4/2/94
+.\" $FreeBSD: stable/10/lib/libc/sys/write.2 255486 2013-09-12 00:53:38Z bdrewery $
 .\" $MidnightBSD$
-.\"
-.Dd July 7, 2005
+.Dd September 11, 2013
 .Dt WRITE 2
 .Os
 .Sh NAME
@@ -41,16 +41,16 @@
 .Lb libc
 .Sh SYNOPSIS
 .In sys/types.h
-.In sys/uio.h
 .In unistd.h
 .Ft ssize_t
-.Fn write "int d" "const void *buf" "size_t nbytes"
+.Fn write "int fd" "const void *buf" "size_t nbytes"
 .Ft ssize_t
-.Fn pwrite "int d" "const void *buf" "size_t nbytes" "off_t offset"
+.Fn pwrite "int fd" "const void *buf" "size_t nbytes" "off_t offset"
+.In sys/uio.h
 .Ft ssize_t
-.Fn writev "int d" "const struct iovec *iov" "int iovcnt"
+.Fn writev "int fd" "const struct iovec *iov" "int iovcnt"
 .Ft ssize_t
-.Fn pwritev "int d" "const struct iovec *iov" "int iovcnt" "off_t offset"
+.Fn pwritev "int fd" "const struct iovec *iov" "int iovcnt" "off_t offset"
 .Sh DESCRIPTION
 The
 .Fn write
@@ -58,7 +58,7 @@
 attempts to write
 .Fa nbytes
 of data to the object referenced by the descriptor
-.Fa d
+.Fa fd
 from the buffer pointed to by
 .Fa buf .
 The
@@ -107,7 +107,7 @@
 .Fn write
 starts at a position
 given by the pointer associated with
-.Fa d ,
+.Fa fd ,
 see
 .Xr lseek 2 .
 Upon return from
@@ -154,7 +154,7 @@
 .Bl -tag -width Er
 .It Bq Er EBADF
 The
-.Fa d
+.Fa fd
 argument
 is not a valid descriptor open for writing.
 .It Bq Er EPIPE
@@ -174,7 +174,7 @@
 points outside the process's allocated address space.
 .It Bq Er EINVAL
 The pointer associated with
-.Fa d
+.Fa fd
 was negative.
 .It Bq Er ENOSPC
 There is no free space remaining on the file system


Property changes on: trunk/lib/libc/sys/write.2
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/lib/libc/sys/write.c
===================================================================
--- trunk/lib/libc/sys/write.c	                        (rev 0)
+++ trunk/lib/libc/sys/write.c	2018-06-07 02:09:33 UTC (rev 10507)
@@ -0,0 +1,51 @@
+/* $MidnightBSD$ */
+/*
+ * Copyright (c) 2014 The FreeBSD Foundation.
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice(s), this list of conditions and the following disclaimer as
+ *    the first lines of this file unmodified other than the possible
+ *    addition of one or more copyright notices.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice(s), this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: stable/10/lib/libc/sys/write.c 277317 2015-01-18 11:54:20Z kib $");
+
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+#include "libc_private.h"
+
+__weak_reference(__sys_write, __write);
+
+#pragma weak write
+ssize_t
+write(int fd, const void *buf, size_t nbytes)
+{
+
+	return (((ssize_t (*)(int, const void *, size_t))
+	    __libc_interposing[INTERPOS_write])(fd, buf, nbytes));
+}


Property changes on: trunk/lib/libc/sys/write.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/lib/libc/sys/writev.c
===================================================================
--- trunk/lib/libc/sys/writev.c	                        (rev 0)
+++ trunk/lib/libc/sys/writev.c	2018-06-07 02:09:33 UTC (rev 10507)
@@ -0,0 +1,51 @@
+/* $MidnightBSD$ */
+/*
+ * Copyright (c) 2014 The FreeBSD Foundation.
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice(s), this list of conditions and the following disclaimer as
+ *    the first lines of this file unmodified other than the possible
+ *    addition of one or more copyright notices.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice(s), this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: stable/10/lib/libc/sys/writev.c 277317 2015-01-18 11:54:20Z kib $");
+
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+#include "libc_private.h"
+
+__weak_reference(__sys_writev, __writev);
+
+#pragma weak writev
+ssize_t
+writev(int fd, const struct iovec *iov, int iovcnt)
+{
+
+	return (((ssize_t (*)(int, const struct iovec *, int))
+	    __libc_interposing[INTERPOS_writev])(fd, iov, iovcnt));
+}


Property changes on: trunk/lib/libc/sys/writev.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list