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

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

?? iolib.c

?? VxWorks操作系統內核源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
    return (fd);    handleError:    if (_func_pthread_setcanceltype != NULL)	{	_func_pthread_setcanceltype(savtype, NULL);	}    if (error > 2)	{	iosDelete (pDevHdr1, fullFileName);	}    if (error > 1)	{	iosFdFree (fd);	}    if (error > 0)	{	fd = (int)ERROR;	}        return (fd);    }/********************************************************************************* unlink - delete a file (POSIX)** This routine deletes a specified file.  It performs the same function* as remove() and is provided for POSIX compatibility.** RETURNS:* OK if there is no delete routine for the device or the driver returns OK;* ERROR if there is no such device or the driver returns ERROR.** SEE ALSO: remove()*/STATUS unlink    (    char *name          /* name of the file to remove */    )    {    return (remove (name));    }/********************************************************************************* remove - remove a file (ANSI)** This routine deletes a specified file.  It calls the driver for the* particular device on which the file is located to do the work.** RETURNS:* OK if there is no delete routine for the device or the driver returns OK;* ERROR if there is no such device or the driver returns ERROR.** SEE ALSO:* .I "American National Standard for Information Systems -"* .I "Programming Language - C, ANSI X3.159-1989: Input/Output (stdio.h),"*/ STATUS remove    (    const char *name          /* name of the file to remove */    )    {    DEV_HDR *pDevHdr;    char fullFileName [MAX_FILENAME_LENGTH];    STATUS value;    /* don't allow null filename (for user protection) */     if ((name == NULL) || (name[0] == EOS))        {        errnoSet (S_ioLib_NO_FILENAME);        return (ERROR);        }     if (ioFullFileNameGet (name, &pDevHdr, fullFileName) == ERROR)        return (ERROR);     value = iosDelete (pDevHdr, fullFileName);    while (value == FOLLOW_LINK)	{	DEV_HDR * pDevHdr2;	int       linkCount = 1;	char *    pPartFileName;	if (linkCount++ > ioMaxLinkLevels)	    {	    errno = ELOOP;	    return ERROR;	    }	if ((pDevHdr2 = iosDevFind (fullFileName, &pPartFileName)) == NULL)	    {	    return ERROR;	    }	if (fullFileName != pPartFileName)	    {	    /* link file name starts with a vxWorks device name,	     * switch to a different device.	     */	    strncpy (fullFileName, pPartFileName, MAX_FILENAME_LENGTH);	    pDevHdr = pDevHdr2;	    }		value = iosDelete (pDevHdr, fullFileName);	}    return value;    }/********************************************************************************* close - close a file** This routine closes the specified file and frees the file descriptor.* It calls the device driver to do the work.** RETURNS:* The status of the driver close routine, or ERROR if the file descriptor * is invalid.*/STATUS close    (    int fd              /* file descriptor to close */    )    {    int ret, savtype;    if (_func_pthread_setcanceltype != NULL)        {        _func_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &savtype);        }    ret = iosClose (fd);    if (_func_pthread_setcanceltype != NULL)        {        _func_pthread_setcanceltype(savtype, NULL);        }    return (ret);    }/********************************************************************************* rename - change the name of a file** This routine changes the name of a file from <oldfile> to <newfile>.** NOTE: Only certain devices support rename().  To confirm that your device* supports it, consult the respective xxDrv or xxFs listings to verify that* ioctl FIORENAME exists.  For example, dosFs and rt11Fs support rename(),* but netDrv and nfsDrv do not.** RETURNS: OK, or ERROR if the file could not be opened or renamed.*/int rename    (    const char *oldname,	/* name of file to rename         */    const char *newname		/* name with which to rename file */    )    {    int fd;    int status;    if ((oldname == NULL) || (newname == NULL) || (newname[0] == EOS))	{	errnoSet (ENOENT);	return (ERROR);	}    /* try to open file */    if ((fd = open ((char *) oldname, O_RDONLY, 0)) < OK)	return (ERROR);    /* rename it */    status = ioctl (fd, FIORENAME, (int) newname);    close (fd);    return (status);    }/********************************************************************************* read - read bytes from a file or device** This routine reads a number of bytes (less than or equal to <maxbytes>)* from a specified file descriptor and places them in <buffer>.  It calls* the device driver to do the work.** RETURNS:* The number of bytes read (between 1 and <maxbytes>, 0 if end of file), or* ERROR if the file descriptor does not exist, the driver does not have* a read routines, or the driver returns ERROR. If the driver does not * have a read routine, errno is set to ENOTSUP.*/int read    (    int fd,             /* file descriptor from which to read   */    char *buffer,       /* pointer to buffer to receive bytes   */    size_t maxbytes     /* max no. of bytes to read into buffer */    )    {    int ret, savtype;    if (_func_pthread_setcanceltype != NULL)        {        _func_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &savtype);        }    ret = iosRead (fd, buffer, (int) maxbytes);    if (_func_pthread_setcanceltype != NULL)        {        _func_pthread_setcanceltype(savtype, NULL);        }    return (ret);    }/********************************************************************************* write - write bytes to a file** This routine writes <nbytes> bytes from <buffer> to a specified file* descriptor <fd>.  It calls the device driver to do the work.** RETURNS:* The number of bytes written (if not equal to <nbytes>, an error has* occurred), or ERROR if the file descriptor does not exist, the driver* does not have a write routine, or the driver returns ERROR. If the driver* does not have a write routine, errno is set to ENOTSUP.*/int write    (    int fd,             /* file descriptor on which to write     */    char *buffer,       /* buffer containing bytes to be written */    size_t nbytes       /* number of bytes to write              */    )    {    int ret, savtype;    if (_func_pthread_setcanceltype != NULL)        {        _func_pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &savtype);        }    ret = iosWrite (fd, buffer, (int) nbytes);    if (_func_pthread_setcanceltype != NULL)        {        _func_pthread_setcanceltype(savtype, NULL);        }    return (ret);    }/********************************************************************************* ioctl - perform an I/O control function** This routine performs an I/O control function on a device.  The control* functions used by VxWorks device drivers are defined in the header file* ioLib.h.  Most requests are passed on to the driver for handling.* Since the availability of ioctl() functions is driver-specific, these* functions are discussed separately in tyLib, pipeDrv, nfsDrv, dosFsLib,* rt11FsLib, and rawFsLib.** The following example renames the file or directory to the string "newname":** .CS*     ioctl (fd, FIORENAME, "newname");* .CE** Note that the function FIOGETNAME is handled by the I/O interface level and* is not passed on to the device driver itself.  Thus this function code value* should not be used by customer-written drivers.** RETURNS:* The return value of the driver, or ERROR if the file descriptor does * not exist.** SEE ALSO: tyLib, pipeDrv, nfsDrv, dosFsLib, rt11FsLib, rawFsLib,* .pG "I/O System, Local File Systems"** VARARGS2*/int ioctl    (    int fd,             /* file descriptor    */    int function,       /* function code      */    int arg             /* arbitrary argument */    )    {    return (iosIoctl (fd, function, arg));    }/********************************************************************************* lseek - set a file read/write pointer** This routine sets the file read/write pointer of file <fd> * to <offset>.* The argument <whence>, which affects the file position pointer,* has three values:* * .TS* tab(|);* 8l l.* SEEK_SET  (0) |- set to <offset>* SEEK_CUR  (1) |- set to current position plus <offset>* SEEK_END  (2) |- set to the size of the file plus <offset>* .TE* * This routine calls ioctl() with functions FIOWHERE, FIONREAD, and FIOSEEK.** RETURNS:* The new offset from the beginning of the file, or ERROR.** ARGSUSED*/int lseek    (    int fd,             /* file descriptor            */    long offset,        /* new byte offset to seek to */    int whence          /* relative file position     */    )    {    int where;    long nBytes;    switch (whence)	{	case SEEK_SET:	    return ((ioctl (fd, FIOSEEK, offset) == OK) ? offset : ERROR);	case SEEK_CUR:	    if ((where = ioctl (fd, FIOWHERE, 0 /*XXX*/)) == ERROR)		return (ERROR);	    offset += where;	    return ((ioctl (fd, FIOSEEK, offset) == OK) ? offset : ERROR);	case SEEK_END:	    if ((where = ioctl (fd, FIOWHERE, 0 /*XXX*/)) == ERROR)		return (ERROR);	    if (ioctl (fd, FIONREAD, (int) (&nBytes)) == ERROR)		return (ERROR);	    offset += where + nBytes;	    return ((ioctl (fd, FIOSEEK, offset) == OK) ? offset : ERROR);	default:	    return (ERROR);	}    }/********************************************************************************* readv - read data from a device into scattered buffers** readv takes as a parameter a list of buffers (iov) into which it should* place data read from the specified file descriptor (fd).  iov is a pointer* to an array of length iovcnt of (struct iovec) structures, which describe* the location and length of each individual buffer.  readv will always* completely fill a buffer before moving on to the next buffer in the list.** RETURNS:* Number of bytes read (0 if end of file), or* ERROR if the file descriptor does not exist or the driver returns ERROR.** NOMANUAL*/int readv    (    int fd,             /* file descriptor                   */    struct iovec *iov,  /* buffer list                       */    int iovcnt          /* number of elements in buffer list */    )    {    int i;    FAST char *pBuf;    FAST int bytesToRead;    FAST int totalBytesRead = 0;    FAST int bytesRead;    for (i = 0; i < iovcnt; i++)        {        pBuf = (char *) iov[i].iov_base;        bytesToRead = iov[i].iov_len;        while (bytesToRead > 0)            {            if ((bytesRead = iosRead (fd, pBuf, bytesToRead)) == ERROR)                {                if (totalBytesRead > 0)                    return (totalBytesRead);                else                    return (ERROR);                }	    if (bytesRead == 0)		return (totalBytesRead);            totalBytesRead += bytesRead;            bytesToRead -= bytesRead;            pBuf += bytesRead;            }        }    return (totalBytesRead);    }/********************************************************************************* writev - write data from scattered buffers to a device** writev takes as a parameter a list of buffers (iov) from which it should* write data to the specified file descriptor (fd).  iov is a pointer* to an array of length iovcnt of (struct iovec) structures, which describe* the location and length of each individual buffer.  writev will always* completely empty a buffer before moving on to the next buffer in the list.** RETURNS:* Number of bytes written, or* ERROR if the file descriptor does not exist or the driver returns ERROR.** NOMANUAL*/int writev    (    int fd,    register struct iovec *iov,    int iovcnt    )    {    int i;    register char *pData;    register int bytesToWrite;    register int totalBytesWritten = 0;    register int bytesWritten;    for (i = 0; i < iovcnt; i++)        {        pData = (char *) iov[i].iov_base;        bytesToWrite = iov[i].iov_len;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大肚乱孕交hd孕妇| 美女高潮久久久| 久草这里只有精品视频| 91捆绑美女网站| 久久免费偷拍视频| 三级不卡在线观看| 一本到一区二区三区| 国产目拍亚洲精品99久久精品| 亚洲国产欧美在线人成| 91在线播放网址| 日本一区二区三区国色天香| 久久精品国产99| 91精品国产综合久久香蕉麻豆| 亚洲欧洲综合另类| 99re热视频精品| 国产精品乱码久久久久久| 久久福利资源站| 欧美一级日韩免费不卡| 性做久久久久久| 欧美日韩免费电影| 午夜精品久久久久久久| 日本道在线观看一区二区| 亚洲人吸女人奶水| 91一区二区在线| 一区二区成人在线| 日本高清成人免费播放| 亚洲欧美日韩在线| 一本色道久久加勒比精品| 一区二区中文视频| 色婷婷综合激情| 一区二区免费在线| 欧美日韩午夜在线视频| 亚洲电影欧美电影有声小说| 精品视频在线免费| 日产欧产美韩系列久久99| 日韩视频123| 韩国成人在线视频| 国产欧美一区二区精品性色超碰| 国产成人aaa| 中文字幕一区二| 色8久久人人97超碰香蕉987| 亚洲一区在线免费观看| 欧美在线观看18| 日本亚洲视频在线| 久久亚洲精华国产精华液| 国产精品亚洲专一区二区三区| 欧美国产禁国产网站cc| 91首页免费视频| 无吗不卡中文字幕| 久久青草国产手机看片福利盒子| 国产99久久久国产精品免费看| 亚洲欧洲色图综合| 欧美日韩一级黄| 精品一区二区免费| 亚洲精品欧美综合四区| 欧美裸体一区二区三区| 国产不卡在线视频| 亚洲无人区一区| 久久蜜臀精品av| 91福利资源站| 国产二区国产一区在线观看| 亚洲欧美一区二区三区国产精品 | 日本一区二区三区dvd视频在线| 菠萝蜜视频在线观看一区| 亚洲午夜在线电影| 国产婷婷色一区二区三区四区| 在线观看免费成人| 国产精品自在欧美一区| 亚洲国产精品一区二区www| 精品国产髙清在线看国产毛片| 成人av综合一区| 麻豆精品一区二区三区| 亚洲欧洲中文日韩久久av乱码| 日韩欧美电影在线| 色八戒一区二区三区| 激情综合一区二区三区| 亚洲影院在线观看| 国产精品你懂的在线| 日韩手机在线导航| 欧美丝袜丝nylons| 成人激情午夜影院| 久久99日本精品| 日韩精品电影在线观看| 亚洲欧洲在线观看av| www成人在线观看| 欧美一区二区三区精品| 91视频免费观看| 福利电影一区二区| 美女脱光内衣内裤视频久久影院| 樱花影视一区二区| 亚洲人亚洲人成电影网站色| 久久美女高清视频 | 色婷婷久久久亚洲一区二区三区| 美女视频一区在线观看| 亚洲国产精品天堂| 亚洲乱码中文字幕| 欧美高清在线一区二区| 国产人成一区二区三区影院| 日韩免费高清视频| 日韩精品影音先锋| 在线不卡免费av| 欧美一区二区三区四区久久| 色偷偷88欧美精品久久久| thepron国产精品| 国产v综合v亚洲欧| 国产剧情av麻豆香蕉精品| 狠狠色丁香婷婷综合| 久久99国产精品久久99| 久久99精品久久久久婷婷| 久久精品国产成人一区二区三区 | 欧美一二三在线| 欧美精品日韩一区| 欧美一区二视频| 欧美一区二区观看视频| 日韩欧美一二三| 精品少妇一区二区三区视频免付费 | 国产成人免费视频一区| 国产成人在线网站| 成人免费看视频| 色婷婷综合中文久久一本| 91福利精品视频| 欧美日韩国产不卡| 91精品在线观看入口| 日韩视频一区二区在线观看| 日韩精品一区二区三区视频在线观看 | 美腿丝袜亚洲一区| 国产中文字幕一区| 成人开心网精品视频| 不卡的av在线播放| 欧美日韩激情一区二区三区| 日韩美女视频在线| 久久久午夜精品| 亚洲日本一区二区三区| 亚洲一区二区精品视频| 久久99久久久久| 成人性生交大片免费看在线播放| 不卡的av电影在线观看| 欧美日韩国产三级| 久久久久久久网| 亚洲精品日日夜夜| 久久精品二区亚洲w码| 成人a级免费电影| 欧美三级日韩在线| 久久毛片高清国产| 一级日本不卡的影视| 黑人巨大精品欧美一区| 色婷婷综合久色| 久久视频一区二区| 亚洲精品中文在线观看| 久久99精品国产.久久久久| 97久久超碰精品国产| 日韩精品一区二区三区视频播放| 国产精品久久久久桃色tv| 蜜臀av在线播放一区二区三区| 成人综合婷婷国产精品久久 | 欧美日韩一本到| 久久久五月婷婷| 午夜久久久影院| jvid福利写真一区二区三区| 欧美一卡二卡三卡| 亚洲猫色日本管| 国产成人在线观看| 91精品国产综合久久精品app | 日本大胆欧美人术艺术动态| 成人精品国产一区二区4080| 日韩午夜三级在线| 亚洲精品国产第一综合99久久| 国产一区二区精品在线观看| 欧美在线色视频| 国产精品久久久久久亚洲伦| 精品无码三级在线观看视频| 欧美浪妇xxxx高跟鞋交| 亚洲国产精品传媒在线观看| 久久精品久久99精品久久| 欧美亚洲国产一区在线观看网站| 日本一区二区视频在线| 久久精品免费看| 欧美军同video69gay| 一区av在线播放| 色噜噜狠狠色综合中国| 欧美极品xxx| 国产精品综合久久| 26uuu亚洲| 国产综合久久久久影院| 欧美不卡一区二区三区四区| 日一区二区三区| 欧美精品免费视频| 亚洲18色成人| 777亚洲妇女| 亚洲成a人v欧美综合天堂下载| 欧美怡红院视频| 亚洲国产美国国产综合一区二区| 色老汉一区二区三区| 亚洲欧美区自拍先锋| 一本大道av伊人久久综合| 亚洲免费av高清| 日本久久电影网| 亚洲电影一区二区三区| 在线91免费看| 狠狠色丁香久久婷婷综合丁香|