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

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

?? nfsdlib.c

?? vxworks的完整的源代碼
?? 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一区二区三区免费野_久草精品视频
国产偷v国产偷v亚洲高清| 日韩欧美一二三四区| 三级在线观看一区二区| 精品国产免费视频| 91精品91久久久中77777| 久久99国产精品久久| 亚洲人成影院在线观看| 久久精品综合网| 欧美日韩国产精选| av男人天堂一区| 久久99精品久久久久久| 亚洲一区二区欧美| 国产精品久久久久影院色老大 | 亚洲午夜在线视频| 久久久亚洲国产美女国产盗摄| 欧美视频在线播放| 成人动漫精品一区二区| 国内一区二区视频| 日韩福利视频网| 亚洲国产你懂的| 亚洲特级片在线| 国产精品色一区二区三区| 日韩精品一区二区三区中文不卡| 日本韩国视频一区二区| av在线不卡免费看| 国产超碰在线一区| 精品无人码麻豆乱码1区2区 | 国产精品原创巨作av| 视频精品一区二区| 亚洲高清三级视频| 亚洲午夜久久久久久久久电影网| 国产精品国产三级国产a| 久久先锋资源网| 久久久综合视频| 久久久久久久久久美女| 精品对白一区国产伦| 久久综合久久99| 久久夜色精品国产欧美乱极品| 日韩一二三四区| 欧美一区二区三区男人的天堂| 在线日韩一区二区| 在线观看日韩国产| 欧亚一区二区三区| 91黄视频在线观看| 欧美午夜精品久久久| 欧美亚州韩日在线看免费版国语版| 色婷婷综合久久| 欧美三区在线观看| 欧美一区二区三区在线观看视频| 欧美精品电影在线播放| 欧美一区二区三区公司| 精品国产一区二区精华| 久久久久国产精品厨房| 国产精品久久久久婷婷| 亚洲男同1069视频| 亚洲成a人v欧美综合天堂| 日韩成人av影视| 国产乱淫av一区二区三区 | 不卡的av在线播放| 成人av一区二区三区| 91在线免费播放| 欧美三级乱人伦电影| 在线电影一区二区三区| 日韩视频一区二区三区 | 久久久亚洲国产美女国产盗摄 | 国产91露脸合集magnet| 95精品视频在线| 7777精品伊人久久久大香线蕉经典版下载| 制服丝袜亚洲色图| 久久亚洲综合av| 亚洲欧美一区二区视频| 亚洲午夜久久久久| 国产麻豆日韩欧美久久| 色吧成人激情小说| 日韩视频免费观看高清完整版 | 亚洲一二三区在线观看| 日韩国产精品久久久久久亚洲| 狠狠v欧美v日韩v亚洲ⅴ| 成人av在线播放网址| 91精品国模一区二区三区| 久久婷婷国产综合精品青草| 亚洲精品久久久蜜桃| 久久国产综合精品| 色欧美88888久久久久久影院| 91麻豆精品国产自产在线| 欧美国产国产综合| 香蕉乱码成人久久天堂爱免费| 国产精品综合视频| 欧美日韩一区二区三区免费看| 欧美精品一区二区高清在线观看| 1区2区3区精品视频| 蜜桃视频在线观看一区二区| 91在线播放网址| 欧美成人vr18sexvr| 亚洲与欧洲av电影| 国产91综合网| 91精品在线一区二区| 国产精品毛片无遮挡高清| 美女视频网站久久| 欧美在线制服丝袜| 日本一区二区视频在线观看| 亚洲一区二区三区四区的| 国产精品小仙女| 91精品国产全国免费观看| 日韩毛片高清在线播放| 国产精品系列在线观看| 91精品国产91久久综合桃花| 亚洲日本va午夜在线电影| 国产一区二区三区美女| 日韩三级中文字幕| 亚洲一区二区三区影院| 亚洲曰韩产成在线| 国产一区二区久久| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲狼人国产精品| 国产传媒久久文化传媒| 欧美一级二级三级乱码| 亚洲精品视频在线观看免费| 最好看的中文字幕久久| 婷婷一区二区三区| 国产一区二区在线免费观看| 夜夜精品视频一区二区| 精品日产卡一卡二卡麻豆| 不卡的av在线| 亚洲成av人片在线观看| 精品欧美一区二区三区精品久久 | 麻豆精品在线看| 久久久久国产免费免费| 国产一区在线观看视频| 国产精品免费aⅴ片在线观看| 麻豆成人91精品二区三区| 欧美一区二区三区性视频| 国内外成人在线| 欧美理论电影在线| 激情亚洲综合在线| 日本一区二区免费在线| 在线亚洲一区观看| 日韩不卡在线观看日韩不卡视频| 国产日韩在线不卡| 亚洲精品一区二区三区蜜桃下载| 国产剧情一区二区三区| 午夜视频在线观看一区二区三区| 国产日产精品1区| 久久综合资源网| 欧美日韩国产综合一区二区三区 | 国产69精品一区二区亚洲孕妇| 欧美白人最猛性xxxxx69交| 久久成人av少妇免费| 亚洲第一搞黄网站| 亚洲免费av网站| 国产午夜精品一区二区三区四区| 成人午夜免费电影| 美国十次了思思久久精品导航| 国产精品欧美一区喷水| 欧美日本一区二区三区| 蜜臂av日日欢夜夜爽一区| 久久久久久久精| 欧美一级在线观看| 日本韩国欧美三级| 国产精品一区免费在线观看| 国产精品视频一二三区 | 欧美一区2区视频在线观看| zzijzzij亚洲日本少妇熟睡| 国产乱码精品一区二区三区忘忧草 | 久久久久国产精品麻豆| 亚洲精品一区二区精华| 国产三区在线成人av| 国产成人午夜片在线观看高清观看| 91精品国产aⅴ一区二区| 精品在线你懂的| 亚洲人吸女人奶水| 欧美一区二区成人6969| 国产美女一区二区| 亚洲精品免费看| 日韩一卡二卡三卡| jlzzjlzz亚洲日本少妇| 亚洲电影一区二区| 欧美一卡2卡3卡4卡| 成人激情免费视频| 亚洲电影一区二区| 精品国产髙清在线看国产毛片| 成人免费不卡视频| 香蕉久久夜色精品国产使用方法 | 欧美乱熟臀69xxxxxx| 麻豆精品在线观看| 亚洲欧美在线视频观看| 欧美一级电影网站| 色综合天天做天天爱| 美女视频网站黄色亚洲| 日韩理论片在线| 欧美videos中文字幕| 一本大道久久精品懂色aⅴ| 麻豆成人免费电影| 亚洲激情自拍视频| 国产日韩三级在线| 91精品国产综合久久福利软件| 99久久国产综合精品女不卡| 精品一区二区国语对白| 午夜精品久久久久久久久久| 欧美激情一区二区三区不卡 |