diff options
author | gleb <gleb@FreeBSD.org> | 2012-05-25 09:16:59 +0000 |
---|---|---|
committer | gleb <gleb@FreeBSD.org> | 2012-05-25 09:16:59 +0000 |
commit | fe722ad5af4b63021329220b59efca9752e6cc2c (patch) | |
tree | 780906a18e908e8904cad2e0edbb351f5c34aa43 /sys/fs/ntfs/ntfs_vnops.c | |
parent | 7c20c99fdf711cf24555d01420ec10deb619f5e5 (diff) | |
download | FreeBSD-src-fe722ad5af4b63021329220b59efca9752e6cc2c.zip FreeBSD-src-fe722ad5af4b63021329220b59efca9752e6cc2c.tar.gz |
Use C99-style initialization for struct dirent in preparation for
changing the structure.
Sponsored by: Google Summer of Code 2011
Diffstat (limited to 'sys/fs/ntfs/ntfs_vnops.c')
-rw-r--r-- | sys/fs/ntfs/ntfs_vnops.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c index 76776a1..8de8ca4 100644 --- a/sys/fs/ntfs/ntfs_vnops.c +++ b/sys/fs/ntfs/ntfs_vnops.c @@ -493,8 +493,13 @@ ntfs_readdir(ap) /* Simulate . in every dir except ROOT */ if( ip->i_number != NTFS_ROOTINO ) { - struct dirent dot = { NTFS_ROOTINO, - sizeof(struct dirent), DT_DIR, 1, "." }; + struct dirent dot = { + .d_fileno = NTFS_ROOTINO, + .d_reclen = sizeof(struct dirent), + .d_type = DT_DIR, + .d_namlen = 1, + .d_name = "." + }; if( uio->uio_offset < sizeof(struct dirent) ) { dot.d_fileno = ip->i_number; @@ -508,8 +513,13 @@ ntfs_readdir(ap) /* Simulate .. in every dir including ROOT */ if( uio->uio_offset < 2 * sizeof(struct dirent) ) { - struct dirent dotdot = { NTFS_ROOTINO, - sizeof(struct dirent), DT_DIR, 2, ".." }; + struct dirent dotdot = { + .d_fileno = NTFS_ROOTINO, + .d_reclen = sizeof(struct dirent), + .d_type = DT_DIR, + .d_namlen = 2, + .d_name = ".." + }; error = uiomove((char *)&dotdot,sizeof(struct dirent),uio); if(error) |