aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-03-13 00:40:19 +0000
committerMark Whitley <markw@lineo.com>2001-03-13 00:40:19 +0000
commite0bf91d7c612619526772605890538f0c3e44c05 (patch)
tree468e0e8126f57b7be69f471ed3ac046a9f8fedb4 /utility.c
parent53737c5421b2356ead7659249000daac7c1aea21 (diff)
downloadbusybox-e0bf91d7c612619526772605890538f0c3e44c05.tar.gz
Applied patch from Christophe Boyanique to add -i support to rm.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index c557130b9..8e85894d0 100644
--- a/utility.c
+++ b/utility.c
@@ -1859,6 +1859,24 @@ void trim(char *s)
}
#endif
+#ifdef BB_FEATURE_RM_INTERACTIVE
+ #if defined (BB_CP_MV) || defined (BB_RM)
+int ask_confirmation()
+{
+ int c = '\0';
+ int ret = 0;
+
+ while (c != '\n') {
+ c = getchar();
+ if ( c != '\n' ) {
+ ret = ((c=='y')||(c=='Y')) ? 1 : 0;
+ }
+ }
+ return ret;
+}
+ #endif
+#endif
+
/* END CODE */
/*
Local Variables: