Blame libarchive/archive_pack_dev.h

Packit Service 1d0348
/*	$NetBSD: pack_dev.h,v 1.8 2013/06/14 16:28:20 tsutsui Exp $	*/
Packit Service 1d0348
Packit Service 1d0348
/*-
Packit Service 1d0348
 * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
Packit Service 1d0348
 * All rights reserved.
Packit Service 1d0348
 *
Packit Service 1d0348
 * This code is derived from software contributed to The NetBSD Foundation
Packit Service 1d0348
 * by Charles M. Hannum.
Packit Service 1d0348
 *
Packit Service 1d0348
 * Redistribution and use in source and binary forms, with or without
Packit Service 1d0348
 * modification, are permitted provided that the following conditions
Packit Service 1d0348
 * are met:
Packit Service 1d0348
 * 1. Redistributions of source code must retain the above copyright
Packit Service 1d0348
 *    notice, this list of conditions and the following disclaimer.
Packit Service 1d0348
 * 2. Redistributions in binary form must reproduce the above copyright
Packit Service 1d0348
 *    notice, this list of conditions and the following disclaimer in the
Packit Service 1d0348
 *    documentation and/or other materials provided with the distribution.
Packit Service 1d0348
 *
Packit Service 1d0348
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
Packit Service 1d0348
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Packit Service 1d0348
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Packit Service 1d0348
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
Packit Service 1d0348
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Packit Service 1d0348
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Packit Service 1d0348
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Packit Service 1d0348
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
Packit Service 1d0348
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
Packit Service 1d0348
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Packit Service 1d0348
 * POSSIBILITY OF SUCH DAMAGE.
Packit Service 1d0348
 */
Packit Service 1d0348
Packit Service 1d0348
/* Originally from NetBSD's mknod(8) source. */
Packit Service 1d0348
Packit Service 1d0348
#ifndef	_PACK_DEV_H
Packit Service 1d0348
#define	_PACK_DEV_H
Packit Service 1d0348
Packit Service 1d0348
typedef	dev_t pack_t(int, unsigned long [], const char **);
Packit Service 1d0348
Packit Service 1d0348
pack_t	*pack_find(const char *);
Packit Service 1d0348
pack_t	 pack_native;
Packit Service 1d0348
Packit Service 1d0348
#define	major_netbsd(x)		((int32_t)((((x) & 0x000fff00) >>  8)))
Packit Service 1d0348
#define	minor_netbsd(x)		((int32_t)((((x) & 0xfff00000) >> 12) | \
Packit Service 1d0348
					   (((x) & 0x000000ff) >>  0)))
Packit Service 1d0348
#define	makedev_netbsd(x,y)	((dev_t)((((x) <<  8) & 0x000fff00) | \
Packit Service 1d0348
					 (((y) << 12) & 0xfff00000) | \
Packit Service 1d0348
					 (((y) <<  0) & 0x000000ff)))
Packit Service 1d0348
Packit Service 1d0348
#endif	/* _PACK_DEV_H */