📄 iscsi-platform.h
字号:
#ifndef ISCSI_PLATFORM_H_#define ISCSI_PLATFORM_H_/* * iSCSI driver for Linux * Copyright (C) 2001 Cisco Systems, Inc. * maintained by linux-iscsi@cisco.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * See the file COPYING included with this distribution for more details. * * $Id: iscsi-platform.h,v 1.6 2002/10/08 20:42:09 smferris Exp $ * * iscsi-platform.h * * abstract platform dependencies * */#if defined(LINUX)# ifdef __KERNEL__# include <linux/config.h># include <linux/version.h># include <linux/stddef.h># include <asm/byteorder.h># include <linux/types.h># include <linux/stddef.h># include <linux/blk.h># define AS_ERROR KERN_ERR# define AS_NOTICE KERN_NOTICE# define AS_INFO KERN_INFO# define AS_DEBUG KERN_DEBUG# define logmsg(level, fmt, arg...) printk(level "iSCSI: " fmt, ##arg)# define debugmsg(level, fmt, arg...) do { } while (0)# define iscsi_strtoul simple_strtoul# ifdef __BIG_ENDIAN# define WORDS_BIGENDIAN 1# endif# else# include <stddef.h># include <stdint.h># include <syslog.h># include <ctype.h># include <netinet/in.h># include <string.h># define AS_ERROR LOG_ERR# define AS_NOTICE LOG_NOTICE# define AS_INFO LOG_INFO# define AS_DEBUG LOG_DEBUG# define iscsi_strtoul strtoul# define iscsi_atoi atoiextern void debugmsg(int level, const char *fmt, ...);extern void errormsg(const char *fmt, ...);extern void logmsg(int priority, const char *fmt, ...);# endif/* both the kernel and userland have the normal names available */# define iscsi_strcmp strcmp# define iscsi_strrchr strrchr# define iscsi_strncmp strncmp# define iscsi_strlen strlen# define iscsi_strncpy strncpy# define iscsi_sprintf sprintf# define iscsi_isdigit isdigit# define iscsi_isspace isspace# define iscsi_ntohl ntohl# define iscsi_ntohs ntohs# define iscsi_htonl htonl# define iscsi_htons htons#elif defined(SOLARIS)# include <unistd.h># include <stddef.h># include <inttypes.h># include <syslog.h># include <ctype.h># include <netinet/in.h># include <string.h># define AS_ERROR LOG_ERR# define AS_NOTICE LOG_NOTICE# define AS_INFO LOG_INFO# define AS_DEBUG LOG_DEBUG# define iscsi_strtoul strtoul# define iscsi_atoi atoi# define iscsi_strcmp strcmp# define iscsi_strrchr strrchr# define iscsi_strncmp strncmp# define iscsi_strlen strlen# define iscsi_strncpy strncpy# define iscsi_sprintf sprintf# define iscsi_isdigit isdigit# define iscsi_isspace isspace# define iscsi_ntohl ntohl# define iscsi_ntohs ntohs# define iscsi_htonl htonl# define iscsi_htons htonsextern void debugmsg(int level, const char *fmt, ...);extern void errormsg(const char *fmt, ...);extern void logmsg(int priority, const char *fmt, ...);#endif /* SOLARIS */#ifndef MIN# define MIN(x,y) ((x) < (y) ? (x) : (y))#endif#ifndef MAX# define MAX(x,y) ((x) >= (y) ? (x) : (y))#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -