Date: Mon, 18 Oct 1999 10:07:17 -0700 (PDT) From: Brian Beattie <beattie@aracnet.com> To: "Aleksandr A.Babaylov" <babolo@links.ru> Cc: Doug <Doug@gorean.org>, freebsd-hackers@FreeBSD.ORG Subject: Re: how mkdir without .. ? Message-ID: <Pine.LNX.4.10.9910180955410.11471-100000@shell2.aracnet.com> In-Reply-To: <199910181324.RAA09383@aaz.links.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.9910180955410.11471-100000>