summaryrefslogtreecommitdiff
path: root/examples/loadables/rm.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2020-12-06 15:51:17 -0500
committerChet Ramey <chet.ramey@case.edu>2020-12-06 15:51:17 -0500
commit8868edaf2250e09c4e9a1c75ffe3274f28f38581 (patch)
treed9a7812ab6cd2f45c5021755c4c094b19dab1b51 /examples/loadables/rm.c
parent36f2c406ff27995392a9247dfa90672fdaf7dc43 (diff)
downloadbash-8868edaf2250e09c4e9a1c75ffe3274f28f38581.tar.gz
bash-5.1 distribution sources and documentationbash-5.1
Diffstat (limited to 'examples/loadables/rm.c')
-rw-r--r--examples/loadables/rm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/loadables/rm.c b/examples/loadables/rm.c
index adfbffdc..0af5493c 100644
--- a/examples/loadables/rm.c
+++ b/examples/loadables/rm.c
@@ -145,8 +145,12 @@ rm_builtin (list)
if (list == 0)
{
- builtin_usage ();
- return (EXECUTION_FAILURE);
+ if (force == 0)
+ {
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ return (EXECUTION_SUCCESS);
}
for (l = list; l; l = l->next)