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

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

?? nfsdlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
* NOMANUAL*/void * nfsproc_writecache_2    (    void    )    {    /* Increment statistics */    nfsdServerStatus.writecacheCalls++;    return ((void *) KHEAP_ALLOC(0));    }/******************************************************************************** nfsproc_write_2 -* * Writes "data" beginning "offset" bytes from the beginning of "file".* The first byte of the file is at offset zero.  If the reply "status"* is NFS_OK, then the reply "attributes" contains the attributes of the* file after the write has completed.  The write operation is atomic.* Data from this "WRITE" will not be mixed with data from another* client's "WRITE".* * Notes:  The arguments "beginoffset" and "totalcount" are ignored and* are removed in the next protocol revision.** NOMANUAL*/attrstat * nfsproc_write_2    (    writeargs * wrArgs		/* File, write data, and offset information */    )    {    char *      fileName;       /* Name of the file to write */    attrstat *  retVal;		/* Return value */    int         fd;		/* File descriptor for file to write */    int		nBytes;		/* Number of bytes actually written */    int         writeCount;     /* Number of bytes to write */    BOOL        writeError = FALSE;        if ((retVal = KHEAP_ALLOC(sizeof (*retVal))) == NULL)	return (NULL);        if ((fileName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Increment statistics */    nfsdServerStatus.writeCalls++;    nfsdFhNtoh ((NFS_FILE_HANDLE *) &wrArgs->file);        /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &wrArgs->file))	{	retVal->status = NFSERR_ACCES;	return (retVal);	}    if (nfsdFhToName ((NFS_FILE_HANDLE *) &wrArgs->file, fileName) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    if ((fd = open (fileName, O_WRONLY, 0)) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}        if (lseek (fd, wrArgs->offset, SEEK_SET) != wrArgs->offset)    	{	retVal->status = nfsdErrToNfs (errno);	close (fd);	return (retVal);	}    errno = OK;    writeCount = wrArgs->data.data_len;    if ((nBytes = write (fd, wrArgs->data.data_val, writeCount)) != writeCount)	{	if (errno == OK)	    {	    /* Try this twice to get around a dosFs bug */	    writeCount -= nBytes;	    if (write (fd, wrArgs->data.data_val, writeCount) != writeCount)		writeError = TRUE;	    }	else	    writeError = TRUE;		if (writeError)	    {	    retVal->status = nfsdErrToNfs (errno);	    close (fd);	    return (retVal);	    }	}        if (close (fd) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    if (nfsdFattrGet ((NFS_FILE_HANDLE *) &wrArgs->file,			 &retVal->attrstat_u.attributes) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    retVal->status = NFS_OK;    return (retVal);    }/******************************************************************************** nfsproc_create_2 - create a file* * The file "name" is created in the directory given by "dir".  The* initial attributes of the new file are given by "attributes".  A* reply "status" of NFS_OK indicates that the file was created, and* reply "file" and reply "attributes" are its file handle and* attributes.  Any other reply "status" means that the operation failed* and no file was created.* * Notes:  This routine should pass an exclusive create flag, meaning* "create the file only if it is not already there".* * NOMANUAL*/diropres * nfsproc_create_2    (    createargs * newFile  /* File to create */    )    {    diropres *   retVal = KHEAP_ALLOC(sizeof (diropres)); /* Return value */    char *       newName;       /* Name of file to create */    int          fd;		/* File descriptor for file to create */    if (retVal == NULL)        return (NULL);        if ((newName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Increment statistics */    nfsdServerStatus.createCalls++;    /* Create the name for the new file by getting the name of the directory,     * followed by "/" and the name of the new file     */        nfsdFhNtoh ((NFS_FILE_HANDLE *) &newFile->where.dir);        /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &newFile->where.dir))	{	retVal->status = NFSERR_ACCES;	return (retVal);	}    if (nfsdFhToName ((NFS_FILE_HANDLE *) &newFile->where.dir, newName)	== ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    strcat (newName, "/");    strcat (newName, newFile->where.name);    /* Check if the file has been created already */    if ((fd = open (newName, O_RDWR, 0)) != ERROR)	{	retVal->status = NFSERR_EXIST;	close(fd);	return (retVal);	}    /* Create the file */        if ((fd = open (newName, O_RDWR | O_CREAT, 0)) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}        if (close (fd) == ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    /* Create its file handle */    if (nfsdFhCreate ((NFS_FILE_HANDLE *) &newFile->where.dir,			 newFile->where.name,			 (NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file)	== ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    /* Get its attributes */    if (nfsdFattrGet ((NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file,		     &retVal->diropres_u.diropres.attributes) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    retVal->status = NFS_OK;    nfsdFhHton ((NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file);        return (retVal);    }/******************************************************************************** nfsproc_remove_2 - remove a file* * The file "name" is removed from the directory given by "dir".  A* reply of NFS_OK means the directory entry was removed.* * Notes:  possibly non-idempotent operation.* * NOMANUAL*/nfsstat * nfsproc_remove_2    (    diropargs * removeFile	/* File to be removed */    )    {    nfsstat * retVal = KHEAP_ALLOC(sizeof (nfsstat)); /* Return value */    char *    newName;          /* Name of the file to be removed */    if (retVal == NULL)        return NULL;    if ((newName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Increment statistics */    nfsdServerStatus.removeCalls++;    /* Create the name for removed file by getting the name of the directory,     * followed by "/" and the name of the new file     */    nfsdFhNtoh ((NFS_FILE_HANDLE *) &removeFile->dir);        /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &removeFile->dir))	{	*retVal = NFSERR_ACCES;	return (retVal);	}    if (nfsdFhToName ((NFS_FILE_HANDLE *) &removeFile->dir, newName)	== ERROR)	{	*retVal = nfsdErrToNfs (errno);	return (retVal);	}    strcat (newName, "/");    strcat (newName, removeFile->name);    /* Do the removal */    if (unlink (newName) == ERROR)	*retVal = nfsdErrToNfs (errno);    else	*retVal = NFS_OK;    return (retVal);    }/******************************************************************************** nfsproc_rename_2 - rename a file* * The existing file "from.name" in the directory given by "from.dir" is* renamed to "to.name" in the directory given by "to.dir".  If the* reply is NFS_OK, the file was renamed.  The RENAME operation is* atomic on the server; it cannot be interrupted in the middle.* * Notes:  possibly non-idempotent operation.* * NOMANUAL*/nfsstat * nfsproc_rename_2    (    renameargs * names		/* New and old file names */    )    {    nfsstat * retVal = KHEAP_ALLOC(sizeof (nfsstat)); /* Return value */    char *    oldName;                                /* Old file name */    char *    newName;                                /* New file name */    /* Increment statistics */    nfsdServerStatus.renameCalls++;    if (retVal == NULL)        return (NULL);        if ((oldName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    if ((newName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Create strings for the old and new file names */        nfsdFhNtoh ((NFS_FILE_HANDLE *)  &names->from.dir);    nfsdFhNtoh ((NFS_FILE_HANDLE *)  &names->to.dir);        /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &names->from.dir))	{	*retVal = NFSERR_ACCES;	return (retVal);	}    if (nfsdFhToName ((NFS_FILE_HANDLE *) &names->from.dir, oldName)	== ERROR)	{	*retVal = nfsdErrToNfs (errno);	return (retVal);	}    strcat (oldName, "/");    strcat (oldName, names->from.name);    if (nfsdFhToName ((NFS_FILE_HANDLE *) &names->to.dir, newName)	== ERROR)	{	*retVal = nfsdErrToNfs (errno);	return (retVal);	}    strcat (newName, "/");    strcat (newName, names->to.name);    /* Do the rename() */    if (rename (oldName, newName) == ERROR)	{	*retVal = nfsdErrToNfs (errno);	return (retVal);	}    else        *retVal = NFS_OK;        return (retVal);    }/******************************************************************************** nfsproc_link_2 - create a link - not supported by VxWorks** NOMANUAL*/nfsstat * nfsproc_link_2    (    void    )    {    nfsstat * notSupported = KHEAP_ALLOC(sizeof (nfsstat));    *notSupported = EOPNOTSUPP;    return ((nfsstat *) notSupported);    }/******************************************************************************** nfsproc_symlink_2 - create a symbolic link - not supported by VxWorks** NOMANUAL*/nfsstat * nfsproc_symlink_2    (    void    )    {    nfsstat * notSupported = KHEAP_ALLOC(sizeof (nfsstat));    /* Increment statistics */    nfsdServerStatus.symlinkCalls++;    *notSupported = EOPNOTSUPP;    return ((nfsstat *) notSupported);    }/******************************************************************************** nfsproc_mkdir_2 - create a directory* * The new directory "where.name" is created in the directory given by* "where.dir".  The initial attributes of the new directory are given* by "attributes".  A reply "status" of NFS_OK indicates that the new* directory was created, and reply "file" and reply "attributes" are* its file handle and attributes.  Any other reply "status" means that* the operation failed and no directory was created.* * Notes:  possibly non-idempotent operation.** NOMANUAL*/diropres * nfsproc_mkdir_2    (    createargs * crArgs    )    {    diropres *      retVal = KHEAP_ALLOC(sizeof (diropres));    char *          newName;    if (retVal == NULL)        return (NULL);        if ((newName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Increment statistics */    nfsdServerStatus.mkdirCalls++;    retVal->status = NFS_OK;    /* Create the string for the name of the directory to make */        nfsdFhNtoh ((NFS_FILE_HANDLE *) &crArgs->where.dir);        /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &crArgs->where.dir))	{	retVal->status = NFSERR_ACCES;	return (retVal);	}    if (nfsdFhToName ((NFS_FILE_HANDLE *) &crArgs->where.dir, newName)	== ERROR)	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    strcat (newName, "/");    strcat (newName, crArgs->where.name);    /* make the directory */    if (mkdir (newName) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    /* Create a file handle for the new directory */    if (nfsdFhCreate ((NFS_FILE_HANDLE *) &crArgs->where.dir,			 crArgs->where.name,			 (NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file)	== ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    /* Get the file attributes for the new directory */    if (nfsdFattrGet ((NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file,		     &retVal->diropres_u.diropres.attributes) == ERROR)    	{	retVal->status = nfsdErrToNfs (errno);	return (retVal);	}    nfsdFhHton ((NFS_FILE_HANDLE *) &retVal->diropres_u.diropres.file);    return (retVal);    }/******************************************************************************** nfsproc_rmdir_2 - remove a directory* * The existing empty directory "name" in the directory given by "dir"* is removed.  If the reply is NFS_OK, the directory was removed.* * Notes:  possibly non-idempotent operation.** NOMANUAL*/nfsstat * nfsproc_rmdir_2    (    diropargs * removeDir	/* Directory to remove */    )    {    nfsstat * retVal = KHEAP_ALLOC(sizeof (nfsstat)); /* Return value */    char *    newName;          /* Path name of directory to remove */    if (retVal == NULL)        return NULL;    if ((newName = (char *) alloca (nfsMaxPath)) == NULL)	return (NULL);    /* Increment statistics */    nfsdServerStatus.rmdirCalls++;    nfsdFhNtoh ((NFS_FILE_HANDLE *) &removeDir->dir);        /* Make sure the file system is writeable */    if (nfsdFsReadOnly((NFS_FILE_HANDLE *) &removeDir->dir))	{	*retVal = NFSERR_ACCES;	return (retVal);	}    /* Create the name of the doomed directory */    if (nfsdFhToName ((NFS_FILE_HANDLE *) &removeDir->dir, newName) == ERROR)	{	*retVal = nfsdErrToNfs (errno);	return (retVal);	}    strcat (newName, "/");    strcat (newName, removeDir->name);    /* Remove it */    if (rmdir (newName) == ERROR)	*retVal = nfsdErrToNfs (errno);    else	*retVal = NFS_OK;    return (retVal);    }/******************************************************************************** nfsproc_readdir_2 - read from a directory* * Returns a variable number of directory entries, with a total size of* up to "count" bytes, from the directory given by "dir".  If the* returned value of "status" is NFS_OK, then it is followed by a* variable number of "entry"s.  Each "entry" contains a "fileid" which* consists of a unique number to identify the file within a filesystem,* the "name" of the file, and a "cookie" which is an opaque pointer to* the next entry in the directory.  The cookie is used in the next* READDIR call to get more entries starting at a given point in the* directory.  The special cookie zero (all bits zero) can be used to* get the entries starting at the beginning of the directory.  The* "fileid" field should be the same number as the "fileid" in the the* attributes of the file.  (See section "2.3.5. fattr" under "Basic* Data Types".)  The "eof" flag has a value of TRUE if there are no* more entries in the directory.* * NOMANUAL*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩在线a电影| 91麻豆国产精品久久| 国产高清精品久久久久| 精品国产123| 天堂蜜桃91精品| 欧美日韩日本视频| 日本美女视频一区二区| 精品国产一区二区三区忘忧草 | 日韩视频在线一区二区| 视频一区在线视频| 国产精品免费免费| 91久久香蕉国产日韩欧美9色| 国产精品伦理在线| 欧美一区二区三区人| 六月丁香综合在线视频| 91精品国产91久久综合桃花 | 欧洲日韩一区二区三区| 午夜成人免费视频| 欧美激情综合网| 91麻豆精品国产91久久久久久久久 | 国内不卡的二区三区中文字幕 | 国产福利精品一区二区| 国产精品美女久久久久高潮| 97精品电影院| 一区二区三区四区中文字幕| 久久精品综合网| 欧美视频精品在线观看| 激情国产一区二区| 中文字幕一区二区在线播放| 日韩午夜av电影| 日本精品一区二区三区高清 | 麻豆精品视频在线| 国产精品久久影院| 久久久不卡影院| 精品久久久久久亚洲综合网| 最好看的中文字幕久久| 精品毛片乱码1区2区3区| 777久久久精品| 欧美日韩一级视频| 色哟哟亚洲精品| 色婷婷av一区二区三区大白胸 | 免费成人av资源网| 免费人成精品欧美精品| 一区二区三区日本| 亚洲午夜一区二区| 亚洲午夜免费电影| 亚洲欧洲日韩一区二区三区| 国产蜜臀av在线一区二区三区| 欧美va亚洲va香蕉在线| 欧美va在线播放| 亚洲欧洲另类国产综合| 一区在线中文字幕| 亚洲美女屁股眼交3| 欧美老肥妇做.爰bbww| 欧美一区二区三区思思人| 在线成人免费视频| 国产日韩成人精品| 中文字幕一区二区视频| 日韩经典一区二区| 精品一区二区三区免费观看| 亚洲尤物视频在线| 久久一二三国产| 亚洲国产一区二区在线播放| 国产精品一区免费视频| 色婷婷久久综合| 中文字幕不卡的av| 国产一区二区剧情av在线| 欧洲视频一区二区| 亚洲精品伦理在线| 不卡的av在线播放| 国产偷国产偷精品高清尤物 | 国产91精品精华液一区二区三区| 欧美日本国产一区| 国产成人精品1024| 91一区二区三区在线播放| 成人国产电影网| 久久综合九色综合久久久精品综合| 精品免费视频一区二区| 国产真实精品久久二三区| 精品国产免费人成电影在线观看四季 | 久久久久国产精品厨房| 成人网在线免费视频| 亚洲欧美另类久久久精品2019| 欧美一级午夜免费电影| 亚洲一区在线电影| 色香色香欲天天天影视综合网| 欧美在线不卡一区| 成人免费av在线| 国产三级三级三级精品8ⅰ区| 精品一区免费av| 91精品国产麻豆国产自产在线 | 亚洲国产精品高清| 亚洲精品一卡二卡| 欧美色网一区二区| 亚洲高清在线精品| 3atv一区二区三区| 天堂久久久久va久久久久| 欧美浪妇xxxx高跟鞋交| 久久se精品一区精品二区| 日韩一级黄色片| 日本一区二区三区视频视频| 国产69精品一区二区亚洲孕妇| 中文字幕中文字幕在线一区 | 亚洲第一精品在线| 欧美成人精精品一区二区频| 成人av在线看| 欧美乱妇15p| 久久福利资源站| 中文字幕乱码一区二区免费| 一本大道av伊人久久综合| 肉丝袜脚交视频一区二区| 久久精品亚洲麻豆av一区二区 | 亚洲成人免费视| 欧美zozozo| 欧美日韩一级片网站| 岛国一区二区在线观看| 亚洲bdsm女犯bdsm网站| 国产精品素人一区二区| 欧美日韩卡一卡二| 成人动漫在线一区| 日本在线不卡视频| 国产欧美精品一区二区色综合朱莉 | 国产精品成人午夜| 精品国内片67194| 91色在线porny| 一区二区在线观看免费视频播放| 久久精品亚洲精品国产欧美 | 欧美美女直播网站| 91麻豆精品91久久久久同性| 亚洲资源中文字幕| 一区二区成人在线| 亚洲一区成人在线| 免费在线欧美视频| 欧洲一区在线观看| 国产另类ts人妖一区二区| 日本v片在线高清不卡在线观看| 欧洲视频一区二区| 色综合久久久久综合体桃花网| 国产呦萝稀缺另类资源| 免费美女久久99| 亚洲一区二区三区四区五区黄| 亚洲摸摸操操av| 亚洲激情第一区| 国产精品国产成人国产三级| 国产真实精品久久二三区| 蜜臀精品久久久久久蜜臀| 亚洲一区二区三区在线看| 欧美日韩色一区| 日本高清无吗v一区| 色狠狠综合天天综合综合| 日本久久精品电影| 欧美精品电影在线播放| 制服.丝袜.亚洲.另类.中文| 欧美一区二区女人| 久久久精品国产免费观看同学| 国产调教视频一区| 亚洲视频一区在线| 七七婷婷婷婷精品国产| 国产精品亚洲成人| 91福利资源站| 日韩精品一区二区三区蜜臀 | 亚洲美女免费视频| 日本伊人色综合网| 粉嫩久久99精品久久久久久夜| 91丝袜高跟美女视频| 欧美天堂一区二区三区| 欧美成人r级一区二区三区| 久久久不卡网国产精品二区| 亚洲精品成人精品456| 麻豆成人久久精品二区三区红| 免费久久精品视频| 国产成人在线视频网站| 欧美三级午夜理伦三级中视频| wwww国产精品欧美| 婷婷一区二区三区| 色综合天天狠狠| 久久久亚洲高清| 日本aⅴ免费视频一区二区三区| 91亚洲永久精品| 国产精品毛片久久久久久| 国产丝袜在线精品| 天堂va蜜桃一区二区三区| 在线亚洲高清视频| ...av二区三区久久精品| 国产在线播放一区二区三区| 91亚洲男人天堂| 国产精品高潮呻吟久久| 国产米奇在线777精品观看| 欧美一区二区视频在线观看| 亚洲6080在线| 欧美视频中文字幕| 亚洲午夜国产一区99re久久| 波多野结衣一区二区三区| 中文字幕欧美日韩一区| 国产激情一区二区三区桃花岛亚洲| 日韩一级完整毛片| 国产剧情在线观看一区二区| 精品少妇一区二区三区日产乱码| 蜜桃久久精品一区二区| 日韩精品一区二区三区视频播放|