aboutsummaryrefslogtreecommitdiff
path: root/lib/ext2fs/mkdir.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1999-10-23 00:58:54 +0000
committerTheodore Ts'o <tytso@mit.edu>1999-10-23 00:58:54 +0000
commite6198e5a0191b2cbbf9765c4e4df11c7929279e6 (patch)
tree12fed21b080e507baf46bd04aaf1fe63e834dd9a /lib/ext2fs/mkdir.c
parent7847c1d4fff9195c16b6d74194d104200b3f6c67 (diff)
downloade2fsprogs-e6198e5a0191b2cbbf9765c4e4df11c7929279e6.tar.gz
ChangeLog, link.c, mkdir.c, newdir.c:
mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link(). link.c (ext2fs_link): This call now uses the low three bits of the flags parameter to pass the directory filetype information; it will set the directory entry FILETYPE information if the filesystem supports it. newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock option is set, then create the '.' and '..' entries with the filetype set to EXT2_FT_DIR.
Diffstat (limited to 'lib/ext2fs/mkdir.c')
-rw-r--r--lib/ext2fs/mkdir.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ext2fs/mkdir.c b/lib/ext2fs/mkdir.c
index b2e8094d..06fd9032 100644
--- a/lib/ext2fs/mkdir.c
+++ b/lib/ext2fs/mkdir.c
@@ -31,6 +31,10 @@
#include "ext2fs.h"
+#ifndef EXT2_FT_DIR
+#define EXT2_FT_DIR 2
+#endif
+
errcode_t ext2fs_mkdir(ext2_filsys fs, ino_t parent, ino_t inum,
const char *name)
{
@@ -116,7 +120,7 @@ errcode_t ext2fs_mkdir(ext2_filsys fs, ino_t parent, ino_t inum,
}
if (retval != EXT2_ET_FILE_NOT_FOUND)
goto cleanup;
- retval = ext2fs_link(fs, parent, name, ino, 0);
+ retval = ext2fs_link(fs, parent, name, ino, EXT2_FT_DIR);
if (retval)
goto cleanup;
}