From owner-freebsd-hackers Mon Oct 18 10: 9:42 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from jumping-spider.aracnet.com (jumping-spider.aracnet.com [205.159.88.14]) by hub.freebsd.org (Postfix) with ESMTP id 3CA9D14CBB for ; Mon, 18 Oct 1999 10:09:41 -0700 (PDT) (envelope-from beattie@aracnet.com) Received: from shell2.aracnet.com (IDENT:1728@shell2.aracnet.com [216.99.193.20]) by jumping-spider.aracnet.com (8.9.3/8.9.3) with ESMTP id KAA00551; Mon, 18 Oct 1999 10:07:50 -0700 Received: from localhost by shell2.aracnet.com (8.8.7) id KAA12544; Mon, 18 Oct 1999 10:07:17 -0700 X-Authentication-Warning: shell2.aracnet.com: beattie owned process doing -bs Date: Mon, 18 Oct 1999 10:07:17 -0700 (PDT) From: Brian Beattie To: "Aleksandr A.Babaylov" Cc: Doug , freebsd-hackers@FreeBSD.ORG Subject: Re: how mkdir without .. ? In-Reply-To: <199910181324.RAA09383@aaz.links.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 18 Oct 1999, Aleksandr A.Babaylov wrote: > > I remember, that in really old UNIXes creating a dirertory > and populating it with "." and ".." entryes was different > steps, but I dont remember method (I was young and dumb then) > the mkdir command was something along the lines of: main( argc, argv ) { ... chdir(parentdir); mknod("foo",I_DIR|modes); link("foo", "."); link(".",".."); ... } This was on a version 7, or system V, filesystem. It is no longer possible to use mknod to make a directory inode. The rasson for this is that some filesystems can not be made to support the old semantics, and it is a good idea to have an atomic method to make a directory. > -- > @BABOLO http://links.ru/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > Brian Beattie | The only problem with beattie@aracnet.com | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message