aboutsummaryrefslogtreecommitdiff
path: root/src/eclat.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-12-07 14:57:32 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-12-07 15:16:14 +0200
commit5a7b73860974384d8e00065105435403b0842ab0 (patch)
tree3f029c22f0a29a842002279bb4b5561af61a8aa8 /src/eclat.h
parentc12cd5695cf1a6c2c44100a68762ab66356f43b8 (diff)
downloadeclat-5a7b73860974384d8e00065105435403b0842ab0.tar.gz
eclat-5a7b73860974384d8e00065105435403b0842ab0.tar.bz2
Re-implement confirmation support.
* doc/eclat-delete-volume.1: Update. * doc/eclat-release-address.1: Update. * doc/eclat.1: Update. * doc/eclat.conf.5: New section "CONFIRMATION" * lib/getyn.c (eclat_vgetyn): Negative default stands for no default at all. * lib/confirm.c (eclat_confirm_mode): Remove. (eclat_confirm): Change signature. Act according to the first argument. * lib/libeclat.h (eclat_confirm_mode): New enum. (eclat_confirm): Change signature. * src/cmdline.opt: Change handling of -Y and -N options. * src/config.c: New statement "confirm". * src/cretags.c: Remove call to eclat_confirm. This is done by the caller. * src/delvol.c: Likewise. * src/reladdr.c: Likewise. * src/eclat.c (confirm_mode): New variable. (command) <flags>: New member. (cmdtab): Mark commands with appropriate flags. (main): Call eclat_confirm to confirm the command. * src/eclat.h (confirm_mode): New extern. (set_command_confirmation): New proto. * etc/eclat.cfin: Set a reasonably safe confirmation default. * lib/forlan.c (strtots): Remove unused variable.
Diffstat (limited to 'src/eclat.h')
-rw-r--r--src/eclat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eclat.h b/src/eclat.h
index ceca4d4..40c4014 100644
--- a/src/eclat.h
+++ b/src/eclat.h
@@ -52,6 +52,7 @@ extern char *secret_key;
extern char *format_file;
extern int translate_option;
extern char *custom_map;
+extern enum eclat_confirm_mode confirm_mode;
typedef int (*config_finish_hook_t) (void*);
@@ -130,3 +131,6 @@ forlan_eval_env_t find_format(const char *name);
void generic_parse_options(const char *pname, const char *docstring,
int argc, char *argv[], int *index);
extern struct grecs_proginfo *generic_proginfo;
+
+void set_command_confirmation(const char *name, enum eclat_confirm_mode cfmode,
+ grecs_locus_t *locus);

Return to:

Send suggestions and report system problems to the System administrator.