diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2009-12-01 22:22:43 -0800 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2010-01-26 21:11:31 +0530 |
commit | a4ea8d54f981d2a5beca215b78939a09f7f3f62a (patch) | |
tree | f63e3991c4c15f7bf7882ebb206ac50260849554 /234/regr/spec_files/open_dir.c | |
parent | 0da4ccb80b36394ac144b5ed7c6c0b3db3bc0566 (diff) |
Regression testcase for bug 234
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to '234/regr/spec_files/open_dir.c')
-rw-r--r-- | 234/regr/spec_files/open_dir.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/234/regr/spec_files/open_dir.c b/234/regr/spec_files/open_dir.c new file mode 100644 index 0000000..81c8d7d --- /dev/null +++ b/234/regr/spec_files/open_dir.c @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/stat.h> +#include <dirent.h> +#include <sys/types.h> +#include <fcntl.h> +#include <errno.h> + +int main(int argc, char *argv[]) +{ + DIR *dir; + dir = opendir(argv[1]); + if ( dir == NULL ) { + return errno; + } + else { + closedir(dir); + return 0; + } +} |