version 1.38, 2010/10/31 15:37:34 |
version 1.39, 2015/01/16 06:40:07 |
|
|
cvs_init_local(void) |
cvs_init_local(void) |
{ |
{ |
u_int i; |
u_int i; |
char path[MAXPATHLEN]; |
char path[PATH_MAX]; |
|
|
cvs_log(LP_TRACE, "cvs_init_local()"); |
cvs_log(LP_TRACE, "cvs_init_local()"); |
|
|
|
|
init_mkdir(current_cvsroot->cr_dir, 0777); |
init_mkdir(current_cvsroot->cr_dir, 0777); |
|
|
for (i = 0; i < INIT_NDIRS; i++) { |
for (i = 0; i < INIT_NDIRS; i++) { |
(void)xsnprintf(path, MAXPATHLEN, "%s/%s", |
(void)xsnprintf(path, PATH_MAX, "%s/%s", |
current_cvsroot->cr_dir, cvsroot_dirs[i]); |
current_cvsroot->cr_dir, cvsroot_dirs[i]); |
|
|
init_mkdir(path, 0777); |
init_mkdir(path, 0777); |
} |
} |
|
|
for (i = 0; i < INIT_NFILES; i++) { |
for (i = 0; i < INIT_NFILES; i++) { |
(void)xsnprintf(path, MAXPATHLEN, "%s/%s", |
(void)xsnprintf(path, PATH_MAX, "%s/%s", |
current_cvsroot->cr_dir, cvsroot_files[i].cf_path); |
current_cvsroot->cr_dir, cvsroot_files[i].cf_path); |
|
|
init_mkfile(path, cvsroot_files[i].cf_content); |
init_mkfile(path, cvsroot_files[i].cf_content); |
|
|
BUF *b; |
BUF *b; |
size_t len; |
size_t len; |
int fd, openflags, rcsflags; |
int fd, openflags, rcsflags; |
char rpath[MAXPATHLEN]; |
char rpath[PATH_MAX]; |
const char **p; |
const char **p; |
RCSFILE *file; |
RCSFILE *file; |
|
|
|
|
return; |
return; |
} |
} |
|
|
(void)xsnprintf(rpath, MAXPATHLEN, "%s%s", path, RCS_FILE_EXT); |
(void)xsnprintf(rpath, PATH_MAX, "%s%s", path, RCS_FILE_EXT); |
|
|
if ((file = rcs_open(rpath, -1, rcsflags, 0444)) == NULL) |
if ((file = rcs_open(rpath, -1, rcsflags, 0444)) == NULL) |
fatal("failed to create RCS file for `%s'", path); |
fatal("failed to create RCS file for `%s'", path); |