xref: /netbsd-src/sys/compat/linux/common/linux_util.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: linux_util.h,v 1.11 2008/04/28 20:23:44 martin Exp $	*/
28fb507a3Schristos 
38fb507a3Schristos /*-
4908291d2Schristos  * Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
58fb507a3Schristos  * All rights reserved.
68fb507a3Schristos  *
78fb507a3Schristos  * This code is derived from software contributed to The NetBSD Foundation
88096c25aSfvdl  * by Christos Zoulas, Frank van der Linden and Eric Haszlakiewicz.
98fb507a3Schristos  *
108fb507a3Schristos  * Redistribution and use in source and binary forms, with or without
118fb507a3Schristos  * modification, are permitted provided that the following conditions
128fb507a3Schristos  * are met:
138fb507a3Schristos  * 1. Redistributions of source code must retain the above copyright
148fb507a3Schristos  *    notice, this list of conditions and the following disclaimer.
158fb507a3Schristos  * 2. Redistributions in binary form must reproduce the above copyright
168fb507a3Schristos  *    notice, this list of conditions and the following disclaimer in the
178fb507a3Schristos  *    documentation and/or other materials provided with the distribution.
188fb507a3Schristos  *
198fb507a3Schristos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
208fb507a3Schristos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
218fb507a3Schristos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
228fb507a3Schristos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
238fb507a3Schristos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
248fb507a3Schristos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
258fb507a3Schristos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
268fb507a3Schristos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
278fb507a3Schristos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
288fb507a3Schristos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
298fb507a3Schristos  * POSSIBILITY OF SUCH DAMAGE.
308fb507a3Schristos  */
313bf459f3Sfvdl 
32908291d2Schristos #ifndef _LINUX_UTIL_H
33908291d2Schristos #define _LINUX_UTIL_H
343bf459f3Sfvdl 
356b95b513Schristos #include <compat/common/compat_util.h>
363bf459f3Sfvdl 
373bf459f3Sfvdl #define cvtto_linux_mask(flags,bmask,lmask) (((flags) & bmask) ? lmask : 0)
383bf459f3Sfvdl #define cvtto_bsd_mask(flags,lmask,bmask) (((flags) & lmask) ? bmask : 0)
393bf459f3Sfvdl 
40908291d2Schristos #endif /* !_LINUX_UTIL_H */
41