=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/add.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/cvs/add.c 2004/12/21 16:48:39 1.10 --- src/usr.bin/cvs/add.c 2004/12/21 17:50:40 1.11 *************** *** 1,4 **** ! /* $OpenBSD: add.c,v 1.10 2004/12/21 16:48:39 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: add.c,v 1.11 2004/12/21 17:50:40 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 83,89 **** return (EX_DATAERR); root = CVS_DIR_ROOT(cvs_files); ! if ((root->cr_method != CVS_METHOD_LOCAL) && (cvs_connect(root) < 0)) return (EX_PROTOCOL); --- 83,95 ---- return (EX_DATAERR); root = CVS_DIR_ROOT(cvs_files); ! if (root == NULL) { ! cvs_log(LP_ERR, ! "No CVSROOT specified! Please use the `-d' option"); ! cvs_log(LP_ERR, ! "or set the CVSROOT environment variable."); ! return (EX_USAGE); ! } if ((root->cr_method != CVS_METHOD_LOCAL) && (cvs_connect(root) < 0)) return (EX_PROTOCOL); *************** *** 127,133 **** } if (root->cr_method != CVS_METHOD_LOCAL) { ! cvs_sendreq(root, CVS_REQ_ADD, CVS_FILE_NAME(cf)); } else { cvs_log(LP_INFO, "scheduling file `%s' for addition", CVS_FILE_NAME(cf)); --- 133,139 ---- } if (root->cr_method != CVS_METHOD_LOCAL) { ! ret = cvs_sendreq(root, CVS_REQ_ADD, CVS_FILE_NAME(cf)); } else { cvs_log(LP_INFO, "scheduling file `%s' for addition", CVS_FILE_NAME(cf));