Hi,
I have a C program which calls rename()
However, it tries to rename a file from a filesys on one device to one on another, and this results in errno=18.
Is there a func that can do this ?
I can of course copy the file and unlink it, but I just wanted to know if there was a utility function in linux to already take care of this.
Thanks Shahed.
--- Shahed Ali shahed@enoor.com wrote:
Hi,
I have a C program which calls rename()
However, it tries to rename a file from a filesys on one device to one on another, and this results in errno=18.
I believe rename() does not work across filesystems. I do not know of any other system call that provides similar functionality, so that I guess you will have to use the copy/ unlink modality, unless of course I have missed something somewhere in libc.
Rgds,
Krishnan
__________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/