diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-04-19 15:36:40 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-04-19 15:36:40 +0000 |
commit | 5937dd9a847a8f476a8e4821745f457ebfea3acd (patch) | |
tree | 87840bd38e13789a751e009a68dedea8d18dfd40 /usr.bin/cvs | |
parent | 0ba1fd24a3fda2072d4c6858529542eef59b2498 (diff) |
- remove unused header
- add -l and -R flags
- add check on cvs_sendentry() return value
joris@ ok
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/remove.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index 5268e8ed9d6..e79ec0f26de 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.8 2005/04/18 21:02:50 jfb Exp $ */ +/* $OpenBSD: remove.c,v 1.9 2005/04/19 15:36:39 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004 Xavier Santolaria <xsa@openbsd.org> @@ -32,7 +32,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <libgen.h> #include <unistd.h> #include "cvs.h" @@ -69,8 +68,10 @@ cvs_remove_options(char *opt, int argc, char **argv, int *arg) force_remove = 1; break; case 'l': + cvs_remove.file_flags &= ~CF_RECURSE; break; case 'R': + cvs_remove.file_flags |= CF_RECURSE; break; default: return (CVS_EX_USAGE); @@ -113,7 +114,10 @@ cvs_remove_file(CVSFILE *cf, void *arg) cvs_file_getpath(cf, fpath, sizeof(fpath)); if (root->cr_method != CVS_METHOD_LOCAL) { - ret = cvs_sendentry(root, cf); + if (cvs_sendentry(root, cf) < 0) { + return (CVS_EX_PROTO); + } + } else { /* if -f option is used, physically remove the file */ if (force_remove == 1) { |