diff options
author | Mark Whitley | 2001-03-13 00:40:19 +0000 |
---|---|---|
committer | Mark Whitley | 2001-03-13 00:40:19 +0000 |
commit | e0bf91d7c612619526772605890538f0c3e44c05 (patch) | |
tree | 468e0e8126f57b7be69f471ed3ac046a9f8fedb4 /utility.c | |
parent | 53737c5421b2356ead7659249000daac7c1aea21 (diff) | |
download | busybox-e0bf91d7c612619526772605890538f0c3e44c05.zip busybox-e0bf91d7c612619526772605890538f0c3e44c05.tar.gz |
Applied patch from Christophe Boyanique to add -i support to rm.
Diffstat (limited to 'utility.c')
-rw-r--r-- | utility.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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: |