这篇教程C++ t_close函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中t_close函数的典型用法代码示例。如果您正苦于以下问题:C++ t_close函数的具体用法?C++ t_close怎么用?C++ t_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了t_close函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: t56/* * getdirentries should return -1 and set errno to EINVAL when the size * specified as an argument is too small to contain at least one entry * (see bugzilla ticket 12229) */int t56(char *name){ int fd; size_t nbytes; off_t basep = 0; long rc = 0; cfs_dirent_t dir; ENTER("getdirentries should fail if nbytes is too small"); /* Set count to be very small. The result should be EINVAL */ nbytes = 8; /* open the directory and call getdirentries */ fd = t_opendir(lustre_path); rc = getdirentries(fd, (char *)&dir, nbytes, &basep); if (rc != -1) { printf("Test failed: getdirentries returned %lld/n", (long long)rc); t_close(fd); return -1; } if (errno != EINVAL) { printf("Test failed: getdirentries returned %lld but errno is " "set to %d (should be EINVAL)/n", (long long)rc, errno); t_close(fd); return -1; } t_close(fd); LEAVE();}
开发者ID:dmlb2000,项目名称:lustre-release,代码行数:39,
|