亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ioctl.c

?? glibc 庫, 不僅可以學習使用庫函數,還可以學習函數的具體實現,是提高功力的好資料
?? C
字號:
/* Copyright (C) 1992,93,94,95,96,97,99,2000,2002,2005	Free Software Foundation, Inc.   This file is part of the GNU C Library.   The GNU C Library is free software; you can redistribute it and/or   modify it under the terms of the GNU Lesser General Public   License as published by the Free Software Foundation; either   version 2.1 of the License, or (at your option) any later version.   The GNU C Library 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   Lesser General Public License for more details.   You should have received a copy of the GNU Lesser General Public   License along with the GNU C Library; if not, write to the Free   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307 USA.  */#include <errno.h>#include <sys/ioctl.h>#include <hurd.h>#include <hurd/fd.h>#include <hurd/signal.h>#include <stdarg.h>#include <mach/notify.h>#include <assert.h>#include <string.h>#include <stdint.h>#include <hurd/ioctl.h>#include <mach/mig_support.h>#include <hurd/ioctls.defs>#define typesize(type)	(1 << (type))/* Perform the I/O control operation specified by REQUEST on FD.   The actual type and use of ARG and the return value depend on REQUEST.  */int__ioctl (int fd, unsigned long int request, ...){#ifdef MACH_MSG_TYPE_CHAR  /* Map individual type fields to Mach IPC types.  */  static const int mach_types[] =    { MACH_MSG_TYPE_CHAR, MACH_MSG_TYPE_INTEGER_16, MACH_MSG_TYPE_INTEGER_32,      MACH_MSG_TYPE_INTEGER_64 };#define io2mach_type(count, type) \  ((mach_msg_type_t) { mach_types[type], typesize (type) * 8, count, 1, 0, 0 })#endif  /* Extract the type information encoded in the request.  */  unsigned int type = _IOC_TYPE (request);  /* Message buffer.  */#define msg_align(x) \  (((x) + sizeof (mach_msg_type_t) - 1) & ~(sizeof (mach_msg_type_t) - 1))  struct  {#ifdef MACH_MSG_TYPE_BIT    union    {      mig_reply_header_t header;      struct      {	mach_msg_header_t	Head;	int			RetCodeType;	kern_return_t		RetCode;      } header_typecheck;    };    char data[3 * sizeof (mach_msg_type_t) +	     msg_align (_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type))) +	     msg_align (_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type))) +	     _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))];#else  /* Untyped Mach IPC format.  */    mig_reply_error_t header;    char data[_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type)) +	     _IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type)) +	     _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))];    mach_msg_trailer_t trailer;#endif  } msg;  mach_msg_header_t *const m = &msg.header.Head;  mach_msg_id_t msgid;  unsigned int reply_size;#ifdef MACH_MSG_TYPE_BIT  mach_msg_type_t *t;#else  void *p;#endif  void *arg;  error_t err;  /* Send the RPC already packed up in MSG to IOPORT     and decode the return value.  */  error_t send_rpc (io_t ioport)    {      error_t err;#ifdef MACH_MSG_TYPE_BIT      mach_msg_type_t *t = &msg.header.RetCodeType;#else      void *p = &msg.header.RetCode;#endif      /* Marshal the request arguments into the message buffer.	 We must redo this work each time we retry the RPC after a SIGTTOU,	 because the reply message containing the EBACKGROUND error code	 clobbers the same message buffer also used for the request.  */      if (_IOC_INOUT (request) & IOC_IN)	{	  /* We don't want to advance ARG since it will be used to copy out             too if IOC_OUT is also set.  */	  void *argptr = arg;	  /* Pack an argument into the message buffer.  */	  void in (unsigned int count, enum __ioctl_datum type)	    {	      if (count > 0)		{		  const size_t len = count * typesize ((unsigned int) type);#ifdef MACH_MSG_TYPE_BIT		  void *p = &t[1];		  *t = io2mach_type (count, type);		  p = __mempcpy (p, argptr, len);		  p = (void *) (((uintptr_t) p + sizeof (*t) - 1)				& ~(sizeof (*t) - 1));		  t = p;#else		  p = __mempcpy (p, argptr, len);#endif		  argptr += len;		}	    }	  /* Pack the argument data.  */	  in (_IOT_COUNT0 (type), _IOT_TYPE0 (type));	  in (_IOT_COUNT1 (type), _IOT_TYPE1 (type));	  in (_IOT_COUNT2 (type), _IOT_TYPE2 (type));	}      else if (_IOC_INOUT (request) == IOC_VOID)	{	  /* The RPC takes a single integer_t argument.	     Rather than pointing to the value, ARG is the value itself.  */#ifdef MACH_MSG_TYPE_BIT	  *t++ = io2mach_type (1, _IOTS (integer_t));	  *(integer_t *) t = (integer_t) arg;	  t = (void *) t + sizeof (integer_t);#else	  *(integer_t *) p = (integer_t) arg;	  p = (void *) p + sizeof (integer_t);#endif	}      memset (m, 0, sizeof *m);	/* Clear unused fields.  */      m->msgh_size = (#ifdef MACH_MSG_TYPE_BIT		      (char *) t#else		      (char *) p#endif		      - (char *) &msg);      m->msgh_remote_port = ioport;      m->msgh_local_port = __mig_get_reply_port ();      m->msgh_id = msgid;      m->msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND,				     MACH_MSG_TYPE_MAKE_SEND_ONCE);      err = _hurd_intr_rpc_mach_msg (m, MACH_SEND_MSG|MACH_RCV_MSG,				     m->msgh_size, sizeof (msg),				     m->msgh_local_port,				     MACH_MSG_TIMEOUT_NONE,				     MACH_PORT_NULL);      switch (err)	{	case MACH_MSG_SUCCESS:	  break;	case MACH_SEND_INVALID_REPLY:	case MACH_RCV_INVALID_NAME:	  __mig_dealloc_reply_port (m->msgh_local_port);	default:	  return err;	}      if ((m->msgh_bits & MACH_MSGH_BITS_COMPLEX))	{	  /* Allow no ports or VM.  */	  __mach_msg_destroy (m);	  /* Want to return a different error below for a different msgid.  */	  if (m->msgh_id == msgid + 100)	    return MIG_TYPE_ERROR;	}      if (m->msgh_id != msgid + 100)	return (m->msgh_id == MACH_NOTIFY_SEND_ONCE ?		MIG_SERVER_DIED : MIG_REPLY_MISMATCH);      if (m->msgh_size != reply_size &&	  m->msgh_size != sizeof msg.header)	return MIG_TYPE_ERROR;#ifdef MACH_MSG_TYPE_BIT      if (msg.header_typecheck.RetCodeType !=	  ((union { mach_msg_type_t t; int i; })	   { t: io2mach_type (1, _IOTS (msg.header.RetCode)) }).i)	return MIG_TYPE_ERROR;#endif      return msg.header.RetCode;    }  va_list ap;  va_start (ap, request);  arg = va_arg (ap, void *);  va_end (ap);  {    /* Check for a registered handler for REQUEST.  */    ioctl_handler_t handler = _hurd_lookup_ioctl_handler (request);    if (handler)      {	/* This handler groks REQUEST.  Se lo puntamonos.  */	int save = errno;	int result = (*handler) (fd, request, arg);	if (result != -1 || errno != ENOTTY)	  return result;	/* The handler doesn't really grok this one.	   Try the normal RPC translation.  */	errno = save;      }  }  /* Compute the Mach message ID for the RPC from the group and command     parts of the ioctl request.  */  msgid = IOC_MSGID (request);  /* Compute the expected size of the reply.  There is a standard header     consisting of the message header and the reply code.  Then, for out     and in/out ioctls, there come the data with their type headers.  */  reply_size = sizeof msg.header;  if (_IOC_INOUT (request) & IOC_OUT)    {      inline void figure_reply (unsigned int count, enum __ioctl_datum type)	{	  if (count > 0)	    {#ifdef MACH_MSG_TYPE_BIT	      /* Add the size of the type and data.  */	      reply_size += sizeof (mach_msg_type_t) + typesize (type) * count;	      /* Align it to word size.  */	      reply_size += sizeof (mach_msg_type_t) - 1;	      reply_size &= ~(sizeof (mach_msg_type_t) - 1);#else	      reply_size += typesize (type) * count;#endif	    }	}      figure_reply (_IOT_COUNT0 (type), _IOT_TYPE0 (type));      figure_reply (_IOT_COUNT1 (type), _IOT_TYPE1 (type));      figure_reply (_IOT_COUNT2 (type), _IOT_TYPE2 (type));    }  /* Marshal the arguments into the request message and make the RPC.     This wrapper function handles EBACKGROUND returns, turning them     into either SIGTTOU or EIO.  */  err = HURD_DPORT_USE (fd, _hurd_ctty_output (port, ctty, send_rpc));#ifdef MACH_MSG_TYPE_BIT  t = (mach_msg_type_t *) msg.data;#else  p = (void *) msg.data;#endif  switch (err)    {      /* Unpack the message buffer into the argument location.  */      int out (unsigned int count, unsigned int type,	       void *store, void **update)	{	  if (count > 0)	    {	      const size_t len = count * typesize (type);#ifdef MACH_MSG_TYPE_BIT	      union { mach_msg_type_t t; int i; } ipctype;	      ipctype.t = io2mach_type (count, type);	      if (*(int *) t != ipctype.i)		return 1;	      ++t;	      memcpy (store, t, len);	      if (update != NULL)		*update += len;	      t = (void *) (((uintptr_t) t + len + sizeof (*t) - 1)			    & ~(sizeof (*t) - 1));#else	      memcpy (store, p, len);	      p += len;	      if (update != NULL)		*update += len;#endif	    }	  return 0;	}    case 0:      if (m->msgh_size != reply_size ||	  ((_IOC_INOUT (request) & IOC_OUT) &&	   (out (_IOT_COUNT0 (type), _IOT_TYPE0 (type), arg, &arg) ||	    out (_IOT_COUNT1 (type), _IOT_TYPE1 (type), arg, &arg) ||	    out (_IOT_COUNT2 (type), _IOT_TYPE2 (type), arg, &arg))))	return __hurd_fail (MIG_TYPE_ERROR);      return 0;    case MIG_BAD_ID:    case EOPNOTSUPP:      /* The server didn't understand the RPC.  */      err = ENOTTY;    default:      return __hurd_fail (err);    }}weak_alias (__ioctl, ioctl)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费高清一区色橹橹 | 日韩成人dvd| 国产精品一卡二| 欧美日韩三级一区| 国产精品理论在线观看| 免费在线成人网| 日本久久电影网| 国产色产综合色产在线视频| 日韩精品久久久久久| 91蜜桃网址入口| 久久午夜免费电影| 蜜臀久久久久久久| 欧美性大战久久久| 亚洲视频一二三| 国产精一品亚洲二区在线视频| 欧美日产国产精品| 一区二区三区视频在线看| 成人午夜在线免费| 一区二区欧美精品| 成人在线一区二区三区| 26uuu国产在线精品一区二区| 午夜电影网一区| 欧美专区日韩专区| 亚洲日本va在线观看| 成人激情av网| 国产精品素人视频| 国产a区久久久| 国产亚洲制服色| 国模冰冰炮一区二区| 日韩精品中文字幕一区二区三区 | 亚洲图片欧美一区| 日本韩国一区二区三区| 亚洲人成精品久久久久久| 国产成人精品网址| 中文字幕第一页久久| 国产aⅴ综合色| 国产精品天美传媒沈樵| 成人激情动漫在线观看| 中文字幕日韩av资源站| 91在线观看污| 亚洲色图制服丝袜| 日本久久一区二区三区| 亚洲一卡二卡三卡四卡| 欧美午夜视频网站| 日韩精品电影在线| 日韩一级大片在线观看| 卡一卡二国产精品| 精品99一区二区| 国产精一区二区三区| 国产精品欧美一级免费| 不卡av在线网| 一区二区视频在线看| 欧美午夜免费电影| 奇米在线7777在线精品| 精品国产一区二区在线观看| 国产一区在线观看麻豆| 亚洲国产精品精华液ab| 99国产精品久久久| 亚洲综合在线观看视频| 欧美久久久久免费| 久久成人免费电影| 国产欧美一区二区精品婷婷| 99免费精品在线| 亚洲成人先锋电影| 日韩午夜在线影院| 国产福利一区二区| 亚洲激情综合网| 欧美一区二区三区系列电影| 国内一区二区视频| 国产精品久久久久9999吃药| 91福利视频久久久久| 日欧美一区二区| 欧美精品一区二区三区高清aⅴ | 不卡电影一区二区三区| 国产精品综合在线视频| 中文字幕一区在线| 欧美亚洲动漫另类| 乱一区二区av| 国产女主播视频一区二区| 色综合久久久久久久久| 日韩vs国产vs欧美| 国产亚洲精品7777| 色婷婷久久99综合精品jk白丝| 丝袜美腿亚洲一区二区图片| 久久久91精品国产一区二区精品| 91网址在线看| 美国精品在线观看| 中文一区在线播放| 欧美乱妇一区二区三区不卡视频| 久久99精品国产.久久久久| 国产精品久久久久久亚洲伦| 欧美老女人在线| 国产成人精品一区二| 亚洲女人****多毛耸耸8| 3atv在线一区二区三区| 成人免费高清在线观看| 五月天久久比比资源色| 国产日产精品一区| 欧美日韩国产欧美日美国产精品| 国产盗摄一区二区| 三级欧美韩日大片在线看| 国产欧美一二三区| 欧美日韩的一区二区| 成人白浆超碰人人人人| 日韩精品一二三区| 国产精品国产三级国产专播品爱网 | 日韩成人伦理电影在线观看| 中文在线资源观看网站视频免费不卡| 欧美日韩另类一区| 不卡的电视剧免费网站有什么| 蜜臀av性久久久久蜜臀aⅴ| 综合av第一页| 久久丝袜美腿综合| 4438成人网| 91在线云播放| 国产成人精品一区二区三区四区 | 一本一道久久a久久精品综合蜜臀| 麻豆成人在线观看| 一区二区三区在线免费视频| 久久久久久久综合| 欧美丰满嫩嫩电影| 在线视频亚洲一区| 成人免费高清在线| 国产麻豆视频一区二区| 五月婷婷色综合| 亚洲男人的天堂在线aⅴ视频 | 在线观看一区二区精品视频| 国产白丝精品91爽爽久久 | 综合久久给合久久狠狠狠97色 | 91福利在线看| 91亚洲国产成人精品一区二三 | 亚洲图片自拍偷拍| 一区二区三区自拍| 亚洲欧洲美洲综合色网| 久久精品视频网| 欧美xxxxx裸体时装秀| 欧美精品在线视频| 欧美无乱码久久久免费午夜一区| 99综合电影在线视频| 粉嫩av一区二区三区在线播放 | 亚洲va欧美va人人爽| 亚洲国产精品久久人人爱蜜臀| 亚洲免费观看在线视频| 中文字幕永久在线不卡| 国产精品久久三区| 中文一区在线播放| 国产精品蜜臀av| 国产精品久久久久久亚洲毛片| 国产日韩一级二级三级| 久久免费的精品国产v∧| 精品国产麻豆免费人成网站| 欧美v国产在线一区二区三区| 91精品国产全国免费观看| 欧美精选一区二区| 欧美丰满高潮xxxx喷水动漫| 3751色影院一区二区三区| 4438x亚洲最大成人网| 91精品国产综合久久精品| 欧美一区二区三区啪啪| 日韩欧美一区二区在线视频| 日韩欧美在线影院| 欧美变态凌虐bdsm| 精品盗摄一区二区三区| 久久久久久夜精品精品免费| www激情久久| 欧美激情一二三区| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲人成在线播放网站岛国| 中文字幕欧美一| 亚洲欧美日韩系列| 亚洲美女偷拍久久| 亚洲一区二区精品视频| 午夜精品123| 久久狠狠亚洲综合| 久久99国产精品成人| 国产一区二区三区在线观看精品| 国产成人av一区二区三区在线 | 欧美亚洲动漫精品| 6080日韩午夜伦伦午夜伦| 日韩精品一区二区在线| 精品少妇一区二区三区视频免付费 | 欧美三级三级三级| 欧美一级欧美一级在线播放| 精品国产精品网麻豆系列| 久久久www成人免费毛片麻豆| 国产精品嫩草影院av蜜臀| 一区二区三区四区在线播放| 日韩—二三区免费观看av| 国产呦萝稀缺另类资源| 99九九99九九九视频精品| 欧美在线观看视频一区二区三区| 欧美丰满少妇xxxbbb| 久久午夜色播影院免费高清 | 日韩三级精品电影久久久| 久久久av毛片精品| 中文字幕综合网| 日韩vs国产vs欧美| 豆国产96在线|亚洲| 色999日韩国产欧美一区二区| 91精品国产综合久久久蜜臀图片|