[7509] in Athena Bugs

home help back first fref pref prev next nref lref last post

decmips 7.2R: afs vs. rename(2)

daemon@ATHENA.MIT.EDU (John T Kohl)
Thu May 2 13:09:45 1991

Date: Thu, 2 May 91 13:09:32 EDT
From: John T Kohl <jtkohl@MIT.EDU>
To: bugs@MIT.EDU

System name:		quicksilver
Type and version:	KN01 7.2R
Display type:		PM-MONO

What were you trying to do?
	move some files around

What's wrong:
	I got the wrong error code.
in /tmp (on UFS):

[{1}quicksilver:/tmp]
% mkdir frob
c[{1}quicksilver:/tmp]
% cd frob
[{1}quicksilver:/tmp/frob]
% touch a b c
[{1}quicksilver:/tmp/frob]
% mkdir quux
[{1}quicksilver:/tmp/frob]
% mv * quux
mv: quux: rename: Invalid argument
Exit 1               mv * quux
[{1}quicksilver:/tmp/frob]
% ls
quux
[{1}quicksilver:/tmp/frob]
%

=== and in my homedir:

[{1}quicksilver:~]
% mkdir frob
[{1}quicksilver:~]
% cd frob
[{1}quicksilver:~/frob]
% touch a b c
[{1}quicksilver:~/frob]
% mkdir quux
[{1}quicksilver:~/frob]
% mv * quux
mv: quux/quux: rename: Too many levels of symbolic links
Exit 1               mv * quux
[{1}quicksilver:~/frob]
% ls
quux
[{1}quicksilver:~/frob]
%

What should have happened:
	the rename(2) man page specifies these cases for EINVAL and
ELOOP:

          [EINVAL]       The from is a parent directory of to, or an
                         attempt is made to rename ``.'' or ``..''.

          [ELOOP]        Too many symbolic links were encountered in
                         translating either pathname.

clearly EINVAL is the appropriate code for both cases.

Please describe any relevant documentation references:
	rename(2)

home help back first fref pref prev next nref lref last post