From owner-svn-src-projects@FreeBSD.ORG Fri Aug 26 17:37:09 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1F8106566B; Fri, 26 Aug 2011 17:37:09 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6477D8FC0A; Fri, 26 Aug 2011 17:37:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7QHb9ds064547; Fri, 26 Aug 2011 17:37:09 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7QHb9JZ064544; Fri, 26 Aug 2011 17:37:09 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201108261737.p7QHb9JZ064544@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 26 Aug 2011 17:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225197 - in projects/ino64/sys/fs: hpfs ntfs X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 17:37:09 -0000 Author: mdf Date: Fri Aug 26 17:37:09 2011 New Revision: 225197 URL: http://svn.freebsd.org/changeset/base/225197 Log: Use C99-style struct initialization for dirent in preparation for changing the structure. GSoC r222843. Code by Gleb Kurtsou. Modified: projects/ino64/sys/fs/hpfs/hpfs_vnops.c projects/ino64/sys/fs/ntfs/ntfs_vnops.c Modified: projects/ino64/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- projects/ino64/sys/fs/hpfs/hpfs_vnops.c Fri Aug 26 17:35:22 2011 (r225196) +++ projects/ino64/sys/fs/hpfs/hpfs_vnops.c Fri Aug 26 17:37:09 2011 (r225197) @@ -797,10 +797,21 @@ hpfs_de_uiomove ( } -static struct dirent hpfs_de_dot = - { 0, sizeof(struct dirent), DT_DIR, 1, "." }; -static struct dirent hpfs_de_dotdot = - { 0, sizeof(struct dirent), DT_DIR, 2, ".." }; +static struct dirent hpfs_de_dot = { + .d_fileno = 0, + .d_reclen = sizeof(struct dirent), + .d_type = DT_DIR, + .d_namlen = 1, + .d_name = "." +}; +static struct dirent hpfs_de_dotdot = { + .d_fileno = 0, + .d_reclen = sizeof(struct dirent), + .d_type = DT_DIR, + .d_namlen = 2, + .d_name = ".." +}; + int hpfs_readdir(ap) struct vop_readdir_args /* { Modified: projects/ino64/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- projects/ino64/sys/fs/ntfs/ntfs_vnops.c Fri Aug 26 17:35:22 2011 (r225196) +++ projects/ino64/sys/fs/ntfs/ntfs_vnops.c Fri Aug 26 17:37:09 2011 (r225197) @@ -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)