version 1.20, 2008/02/10 14:15:36 |
version 1.21, 2008/02/27 22:34:04 |
|
|
} |
} |
|
|
void |
void |
cvs_remote_send_file(const char *path) |
cvs_remote_send_file(const char *path, int _fd) |
{ |
{ |
int fd; |
int fd; |
FILE *out, *in; |
FILE *out, *in; |
|
|
else |
else |
out = current_cvsroot->cr_srvin; |
out = current_cvsroot->cr_srvin; |
|
|
if ((fd = open(path, O_RDONLY)) == -1) |
fd = dup(_fd); |
fatal("cvs_remote_send_file: %s: %s", path, strerror(errno)); |
if (fd == -1) |
|
fatal("cvs_remote_send_file: dup: %s", strerror(errno)); |
|
|
|
if (lseek(fd, SEEK_SET, 0) < 0) |
|
fatal("cvs_remote_send_file: %s: lseek: %s", path, |
|
strerror(errno)); |
|
|
if (fstat(fd, &st) == -1) |
if (fstat(fd, &st) == -1) |
fatal("cvs_remote_send_file: %s: %s", path, strerror(errno)); |
fatal("cvs_remote_send_file: %s: fstat: %s", path, |
|
strerror(errno)); |
|
|
cvs_modetostr(st.st_mode, buf, sizeof(buf)); |
cvs_modetostr(st.st_mode, buf, sizeof(buf)); |
cvs_remote_output(buf); |
cvs_remote_output(buf); |