![]() |
|
|||
File indexing completed on 2025-05-11 08:24:19
0001 /* $NetBSD: pack_dev.h,v 1.7 2008/04/28 20:23:09 martin Exp $ */ 0002 0003 /*- 0004 * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. 0005 * All rights reserved. 0006 * 0007 * This code is derived from software contributed to The NetBSD Foundation 0008 * by Charles M. Hannum. 0009 * 0010 * Redistribution and use in source and binary forms, with or without 0011 * modification, are permitted provided that the following conditions 0012 * are met: 0013 * 1. Redistributions of source code must retain the above copyright 0014 * notice, this list of conditions and the following disclaimer. 0015 * 2. Redistributions in binary form must reproduce the above copyright 0016 * notice, this list of conditions and the following disclaimer in the 0017 * documentation and/or other materials provided with the distribution. 0018 * 0019 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 0020 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 0021 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 0022 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 0023 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0024 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0025 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0026 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0027 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0028 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0029 * POSSIBILITY OF SUCH DAMAGE. 0030 */ 0031 0032 #ifndef _PACK_DEV_H 0033 #define _PACK_DEV_H 0034 0035 #ifdef __CYGWIN__ 0036 typedef __dev32_t portdev_t; 0037 #else 0038 typedef dev_t portdev_t; 0039 #endif 0040 typedef portdev_t pack_t(int, u_long [], const char **); 0041 0042 static pack_t *pack_find(const char *); 0043 static pack_t pack_native; 0044 0045 #define major_netbsd(x) ((int32_t)((((x) & 0x000fff00) >> 8))) 0046 #define minor_netbsd(x) ((int32_t)((((x) & 0xfff00000) >> 12) | \ 0047 (((x) & 0x000000ff) >> 0))) 0048 #define makedev_netbsd(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \ 0049 (((y) << 12) & 0xfff00000) | \ 0050 (((y) << 0) & 0x000000ff))) 0051 0052 #endif /* _PACK_DEV_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |