Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VxWorks Rename Routine

864 views
Skip to first unread message

Steven McCoy

unread,
Nov 8, 1993, 3:06:18 PM11/8/93
to
Has anyone had a problem with the VxWorks rename routine? I have
tried to execute this with both rsh and NFS but get the same
error, S_netDrv_UNKNOWN_REQUEST. It seems to be doing something
as the experiments below illustrates. I have no problems on
the Sun.

I have noticed that the routine has been moved from usrLib.c and
is now archived in lib/68040/all.a, so I can't check the source.

I have also noticed that an Ada interface to rename is defined in the
Verdix Standard library package IOLIB (as we want to do), but is
not used at a higher level.

-- ***********************************************************************
--
-- rename - change name of file
--
-- This routine changes the name of the specified <oldfile> to <newfile>.
--
-- RETURNS: OK, or ERROR if couldn't open or rename file
--
function rename(from_name, to_name: c_string) return vxTypes.status;
function rename(from_name, to_name: string) return vxTypes.status;

pragma interface(C, rename);


Any ideas would be appreciated.


EXAMPLE:

rename "old","new" Change name of file

ENV VME2>version
VADSworks version 2.0.3(b).
VxWorks (for Motorola MVME167) version 5.0.2b.
Kernel: WIND version 2.0.
Made on Mon Sep 20 14:27:09 EST 1993.

ENV VME2>whoami
stevem

1. If file vme1 does not exist - OK

NFS:

ENV VME2>rename "vme1", "vme2"
value = -1 = 0xffffffff
ENV VME2>printErrno
S_nfsLib_NFSERR_NOENT
value = 22 = 0x16

rsh:

ENV VME2>rename "vme1", "vme2"
ptery:/assip/env/stevem/vme1: No such file or directory
value = -1 = 0xffffffff

2. No directory file permissions - OK

NFS:

ENV VME2>rename "vme1", "vme2"
value = -1 = 0xffffffff
ENV VME2>printErrno
S_nfsLib_NFSERR_ACCES
value = 22 = 0x16

rsh:

ENV VME2>rename "vme1", "vme2"
ptery:/assip/env/stevem/vme1: Permission denied
value = -1 = 0xffffffff

3. File vme1 exists with world R/W - ??

NFS:

ENV VME2>pwd
/home/users/arch/stevem

ENV VME2>rename "vme1", "vme2"
value = -1 = 0xffffffff
ENV VME2>printErrno
S_ioLib_UNKNOWN_REQUEST
value = 24 = 0x18

rsh:

ENV VME2>pwd
ptery:/assip/env/stevem

ENV VME2>rename "vme1", "vme2"
value = -1 = 0xffffffff
ENV VME2>printErrno
S_netDrv_UNKNOWN_REQUEST
value = 25 = 0x19


Thanks in anticipation,
Steven McCoy
Computer Sciences Corporation Australia
ste...@assip.csasyd.oz.au


squeedy

unread,
Nov 8, 1993, 1:11:09 AM11/8/93
to
In article <931108040...@condor.anzac> ste...@syd.csa.com.au (Steven McCoy) writes:
>Has anyone had a problem with the VxWorks rename routine? I have
>tried to execute this with both rsh and NFS but get the same
>error, S_netDrv_UNKNOWN_REQUEST. It seems to be doing something
>as the experiments below illustrates. I have no problems on
>the Sun.

vxworks rename() is an alias for ioctl() FIORENAME. unfortunately,
not all "filesystem" devices support ioctl FIORENAME. netDrv is an example
where renaming cannot be supported. netDrv *could* implement it, but
current vxworks implementation does not implement rename. nfsDrv does
implement it but the ioctl() for nfs is not completely implemented, and
lacks a call to nfsRename(). which means that nfs doesn't know how to
do rename, but it really should be implemented.

--
Hwa-Jin Bae (h...@netcom.com) 510-466-9166 (msg/page)
PEACEFUL STAR 510-536-7607 (office)
2899 Ford St, Oakland, CA 94601-2125 510-536-5889 (fax)

0 new messages