Hard links to directories: why not?

Peter da Silva peter at ficc.ferranti.com
Tue Jul 24 07:10:56 AEST 1990


In article <9007221600.AA00202 at mindcrf.mindcraft.com> karish at mindcrf.UUCP writes:
>     fsck can ignore symbolic links or treat them as ordinary files.
>     It can't ignore hard links.

Sure it can:
	if(stat("subdir/..", &sbuf) != EOF)
		if(stat(".", &dbuf) != EOF)
			if(sbuf.d_ino != dbuf.d_ino)
				type = LINK;
			else
				type = DIR;
		else
			PANIC("can't stat .");
	else
		type = UNKNOWN;
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
<peter at ficc.ferranti.com>



More information about the Comp.unix.wizards mailing list