if (cvs_modetostr(st.st_mode, buf, sizeof(buf)) < 0) return (-1);
cvs_sendfile(struct cvsroot *root, const char *path){	int fd;	ssize_t ret;	char buf[4096];	struct stat st;	if (stat(path, &st) == -1) {		cvs_log(LP_ERRNO, "failed to stat `%s'", path);		return (-1);	}	fd = open(path, O_RDONLY, 0);	if (fd == -1) {		return (-1);	}	if (cvs_modetostr(st.st_mode, buf, sizeof(buf)) < 0)		return (-1);	cvs_sendln(root, buf);	snprintf(buf, sizeof(buf), "%lld\n", st.st_size);	cvs_sendln(root, buf);	while ((ret = read(fd, buf, sizeof(buf))) != 0) {		if (ret == -1) {			cvs_log(LP_ERRNO, "failed to read file `%s'", path);			return (-1);		}		cvs_sendraw(root, buf, (size_t)ret);	}	(void)close(fd);	return (0);}