xref: /netbsd-src/lib/libc/compat/sys/compat___fhstat30.c (revision fda5f877e5074e9afbf7381626cd3cf7f50a1165)
1*fda5f877Schristos /*	$NetBSD: compat___fhstat30.c,v 1.6 2013/10/04 21:07:37 christos Exp $	*/
2b4cb63a6Smartin 
3b4cb63a6Smartin /*-
4b4cb63a6Smartin  * Copyright (c) 2006 The NetBSD Foundation, Inc.
5b4cb63a6Smartin  * All rights reserved.
6b4cb63a6Smartin  *
7b4cb63a6Smartin  * This code is derived from software contributed to The NetBSD Foundation
8b4cb63a6Smartin  * by Martin Husemann <martin@NetBSD.org>.
9b4cb63a6Smartin  *
10b4cb63a6Smartin  * Redistribution and use in source and binary forms, with or without
11b4cb63a6Smartin  * modification, are permitted provided that the following conditions
12b4cb63a6Smartin  * are met:
13b4cb63a6Smartin  * 1. Redistributions of source code must retain the above copyright
14b4cb63a6Smartin  *    notice, this list of conditions and the following disclaimer.
15b4cb63a6Smartin  * 2. Redistributions in binary form must reproduce the above copyright
16b4cb63a6Smartin  *    notice, this list of conditions and the following disclaimer in the
17b4cb63a6Smartin  *    documentation and/or other materials provided with the distribution.
18b4cb63a6Smartin  *
19b4cb63a6Smartin  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20b4cb63a6Smartin  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21b4cb63a6Smartin  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22b4cb63a6Smartin  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23b4cb63a6Smartin  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24b4cb63a6Smartin  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25b4cb63a6Smartin  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26b4cb63a6Smartin  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27b4cb63a6Smartin  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28b4cb63a6Smartin  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29b4cb63a6Smartin  * POSSIBILITY OF SUCH DAMAGE.
30b4cb63a6Smartin  */
31b4cb63a6Smartin 
32b4cb63a6Smartin 
33b4cb63a6Smartin #include <sys/cdefs.h>
34b4cb63a6Smartin #if defined(LIBC_SCCS) && !defined(lint)
35*fda5f877Schristos __RCSID("$NetBSD: compat___fhstat30.c,v 1.6 2013/10/04 21:07:37 christos Exp $");
36b4cb63a6Smartin #endif /* LIBC_SCCS and not lint */
37b4cb63a6Smartin 
38b4cb63a6Smartin #define __LIBC12_SOURCE__
39b4cb63a6Smartin 
40b4cb63a6Smartin #include <sys/types.h>
41b4cb63a6Smartin #include <sys/mount.h>
42b4cb63a6Smartin #include <compat/include/fstypes.h>
43461a86f9Schristos #include <compat/sys/mount.h>
44b4cb63a6Smartin 
45b4cb63a6Smartin __warn_references(fhstat,
46461a86f9Schristos     "warning: reference to compatibility __fhstat30(); include <sys/mount.h> to generate correct reference")
47b4cb63a6Smartin 
__strong_alias(__fhstat30,__compat___fhstat30)48*fda5f877Schristos __strong_alias(__fhstat30, __compat___fhstat30)
49ca2d95d1Schristos 
50b4cb63a6Smartin /*
51b4cb63a6Smartin  * Convert old fhstat() call to new calling convention
52b4cb63a6Smartin  */
53b4cb63a6Smartin int
54*fda5f877Schristos __compat___fhstat30(const struct compat_30_fhandle *fhp, struct stat30 *sb)
55b4cb63a6Smartin {
56*fda5f877Schristos 	return __compat___fhstat40(fhp, FHANDLE30_SIZE, sb);
57b4cb63a6Smartin }
58