]>
git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - tests/progs/hold_inode.c
2 * hold_inode.c --- test program which holds an inode or directory
5 * Copyright (C) 2000 Theodore Ts'o.
8 * This file may be redistributed under the terms of the GNU Public
17 #include <sys/types.h>
22 main(int argc
, char **argv
)
28 fprintf(stderr
, "Usage: %s dir\n", argv
[0]);
32 if (stat(filename
, &statbuf
) < 0) {
36 if (S_ISDIR(statbuf
.st_mode
)) {
37 if (!opendir(filename
)) {
42 if (open(filename
, O_RDONLY
) < 0) {