printk.h revision 278866
155714Skris/*-
255714Skris * Copyright (c) 2010 Isilon Systems, Inc.
355714Skris * Copyright (c) 2010 iX Systems, Inc.
455714Skris * Copyright (c) 2010 Panasas, Inc.
555714Skris * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
655714Skris * All rights reserved.
755714Skris *
8280304Sjkim * Redistribution and use in source and binary forms, with or without
955714Skris * modification, are permitted provided that the following conditions
1055714Skris * are met:
1155714Skris * 1. Redistributions of source code must retain the above copyright
1255714Skris *    notice unmodified, this list of conditions, and the following
1355714Skris *    disclaimer.
1455714Skris * 2. Redistributions in binary form must reproduce the above copyright
15280304Sjkim *    notice, this list of conditions and the following disclaimer in the
1655714Skris *    documentation and/or other materials provided with the distribution.
1755714Skris *
1855714Skris * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1955714Skris * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2055714Skris * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2155714Skris * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22280304Sjkim * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2355714Skris * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2455714Skris * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2555714Skris * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2655714Skris * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2755714Skris * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2855714Skris */
2955714Skris
3055714Skris#ifndef _FBSD_PRINTK_H_
3155714Skris#define	_FBSD_PRINTK_H_
3255714Skris
3355714Skris/* GID printing macros */
3455714Skris#define	GID_PRINT_FMT			"%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x"
3555714Skris#define	GID_PRINT_ARGS(gid_raw)		htons(((u16 *)gid_raw)[0]), htons(((u16 *)gid_raw)[1]),\
3655714Skris					htons(((u16 *)gid_raw)[2]), htons(((u16 *)gid_raw)[3]),\
37280304Sjkim					htons(((u16 *)gid_raw)[4]), htons(((u16 *)gid_raw)[5]),\
3855714Skris					htons(((u16 *)gid_raw)[6]), htons(((u16 *)gid_raw)[7])
3955714Skris
40280304Sjkim#endif					/* _FBSD_PRINTK_H */
4155714Skris