(I'm having some mail problems... I hope this mail wasn't send to bug-hurd more often... if that happened, please forgive me.)
Never! * node-create.c: New file. This file was copied from libdiskfs and changed for fatfs because in fatfs. For fatfs "." and ".." must be created after the directory was created. Please make that a bit shorter. "New file." is enough for this kind of an entry. diff -BNup /home/marco/src/hurdcvs/hurd/fatfs/dir.c fatfs/dir.c --- /home/marco/src/hurdcvs/hurd/fatfs/dir.c 2003-05-10 02:12:29.000000000 +0200 +++ fatfs/dir.c 2003-07-07 22:10:48.000000000 +0200 @@ -22,6 +24,7 @@ #include <string.h> #include <dirent.h> #include "fatfs.h" +#include <hurd/fsys.h> Just esthetics here, but it is always nice to have the local headers after the system wide ones. diff -BNup /home/marco/src/hurdcvs/hurd/fatfs/fat.c fatfs/fat.c --- /home/marco/src/hurdcvs/hurd/fatfs/fat.c 2002-12-03 21:52:59.000000000 +0100 +++ fatfs/fat.c 2003-07-08 00:04:00.000000000 +0200 @@ -386,15 +386,15 @@ fat_extend_chain (struct node *node, clu dn->last = dn->first = *table; return 0; } - - spin_lock(&dn->chain_extension_lock); - + /* If we already have what we need, or we have all clusters that are available without allocating new ones, go out. */ if (new_last_cluster < dn->length_of_chain || (!create && dn->chain_complete)) return 0; + spin_lock(&dn->chain_extension_lock); + Follow the GCS! diff -BNup /home/marco/src/hurdcvs/hurd/fatfs/node-create.c fatfs/node-create.c --- /home/marco/src/hurdcvs/hurd/fatfs/node-create.c 1970-01-01 01:00:00.000000000 +0100 +++ fatfs/node-create.c 2003-07-07 22:14:20.000000000 +0200 @@ -0,0 +1,191 @@ +/* Making new files + Copyright (C) 1992,93,94,96,98,2001, 2003 Free Software Foundation + Modified for fatfs by Marco Gerards. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include <hurd/diskfs.h> + +/* This enables SysV style group behaviour. New nodes inherit the GID + of the user creating them unless the SGID bit is set of the parent + directory. */ +int _diskfs_no_inherit_dir_group; + +/* Create a new node. Give it MODE; if that includes IFDIR, also + initialize `.' and `..' in the new directory. Return the node in NPP. + CRED identifies the user responsible for the call. If NAME is nonzero, + then link the new node into DIR with name NAME; DS is the result of a + prior diskfs_lookup for creation (and DIR has been held locked since). + DIR must always be provided as at least a hint for disk allocation + strategies. */ Update the comment to reflect that this version of diskfs_create_node has to `.' and `..' after the directory has been created. Remeber, its the comment that describes the code, not the other way around! As for general code comments, thats beyond my brain capacity for today... _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd