ott_mv.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1985 AT&T
* All Rights Reserved
*/
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */
#include <stdio.h>
#include <string.h>
#include "wish.h"
#include "sizes.h"
#include "typetab.h"
#include "partabdefs.h"
void recurrent();
int
char *path;
char *name;
bool move;
{
register int i;
int numparts = 0;
int part_offset;
int pathlen;
#ifdef _DEBUG
#endif
return(O_FAIL);
}
else
*dname = '\0';
/** keep the current ott path for later restoration **/
oldpath[0] = '\0';
else
/* cannot copy to same directory if name is the same */
#ifdef _DEBUG
#endif
return(O_FAIL);
}
/** Because various routines could invalidate the pointers inside the
** entry pionter, the first thing to do is to copy all the parts of
** that object to a stable place.
**/
do {
} while (entry);
if (move) { /* do stat on old file to redo ownership and group */
}
#ifdef _DEBUG
#endif
return(O_FAIL);
}
} else {
for (i=0; i < numparts; i++)
}
if (path)
else
/* make sure all parts do not exist */
for (i = 0; i < numparts; i++) {
#ifdef _DEBUG
#endif
return(O_FAIL);
}
/** get the destination ott if it is not the same as the current
** ott.
**/
if (oldpath[0]) {
}
return(O_FAIL);
}
if (!(*dname))
return(O_FAIL);
for (i = 1; i < numparts; i++) {
}
/* physically move the UNIX files */
for (i = 0; i < numparts; i++) {
/* this code can be enhanced to only strcpy the dest once */
if (path)
else
if (path) {
return(O_FAIL);
}
} else {
return(O_FAIL);
}
}
} else {
if (move) {
return(O_FAIL);
}
} else {
return(O_FAIL);
}
}
}
}
/* must reget entry and DONT use old file owner and group of a copy */
/* DO if a move (could have a dir as a part */
if (path)
else
else
if (move) {
for (i = 0; i < numparts; i++) {
}
}
for (i = 0; i < numparts; i++)
return(O_OK);
}
static void
char *oldpath;
{
if (!(*oldpath))
return;
}