version 1.64, 2008/09/12 13:20:36 |
version 1.65, 2015/01/16 06:40:06 |
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
|
#include <sys/param.h> |
#include <sys/types.h> |
#include <sys/dirent.h> |
#include <sys/dirent.h> |
|
|
#include <errno.h> |
#include <errno.h> |
|
|
struct cvs_file *ocf; |
struct cvs_file *ocf; |
struct rcs_access *acp; |
struct rcs_access *acp; |
int ofd; |
int ofd; |
char *d, *f, fpath[MAXPATHLEN], repo[MAXPATHLEN]; |
char *d, *f, fpath[PATH_MAX], repo[PATH_MAX]; |
|
|
|
|
if ((f = basename(oldfilename)) == NULL) |
if ((f = basename(oldfilename)) == NULL) |
|
|
if ((d = dirname(oldfilename)) == NULL) |
if ((d = dirname(oldfilename)) == NULL) |
fatal("cvs_admin_local: dirname failed"); |
fatal("cvs_admin_local: dirname failed"); |
|
|
cvs_get_repository_path(d, repo, MAXPATHLEN); |
cvs_get_repository_path(d, repo, PATH_MAX); |
|
|
(void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", repo, f); |
(void)xsnprintf(fpath, PATH_MAX, "%s/%s", repo, f); |
|
|
if (strlcat(fpath, RCS_FILE_EXT, MAXPATHLEN) >= MAXPATHLEN) |
if (strlcat(fpath, RCS_FILE_EXT, PATH_MAX) >= PATH_MAX) |
fatal("cvs_admin_local: truncation"); |
fatal("cvs_admin_local: truncation"); |
|
|
if ((ofd = open(fpath, O_RDONLY)) == -1) |
if ((ofd = open(fpath, O_RDONLY)) == -1) |