switch (dfui_be_present_dialog(a->c, _("Local or UTC (Greenwich Mean Time) clock"),
_("Yes|No"),
- _("Is this machine's CMOS clock set to UTC?\n"),
- _("If it is set to local time, or you don't know, please choose NO here!"))) {
+ _("Is this machine's CMOS clock set to UTC?\n\n"
+ "If it is set to local time, or you don't know, please choose NO here!"))) {
case 1:
cmds = commands_new();
command_add(cmds, "%s%s %s%setc/wall_cmos_clock",
a->os_root, cmd_name(a, "MOUNT"),
a->os_root,
subpartition_get_device_name(a_subpart),
- a->os_root, a->cfg_root);
+ a->os_root);
command_add(cmds,
"%s%s %sdev/`%s%s \"^vfs\\.root\\.mountfrom\" %sboot/loader.conf |"
"%s%s -Fhammer: '{print $2;}' |"
a->os_root, a->cfg_root);
command_add(cmds, "%s%s %sboot",
a->os_root, cmd_name(a, "UMOUNT"),
- a->os_root, a->cfg_root);
+ a->os_root);
}
if (!commands_execute(a, cmds)) {
commands_free(cmds);
"then try installing the bootblock again. "
"Note that this should not affect the "
"partition table of the disk."),
- disk, disk)) {
+ disk)) {
case 1:
cmds = commands_new();
command_add(cmds,
a->os_root, cmd_name(a, "CHMOD"), a->os_root);
/* Customize stuff here */
- if(is_file("%susr/local/bin/after_installation_routines.sh")) {
+ if(is_file("%susr/local/bin/after_installation_routines.sh", a->os_root)) {
command_add(cmds, "%susr/local/bin/after_installation_routines.sh",
- a->os_root, _("Running after installation custom routines..."));
+ a->os_root);
}
/*
if (total_capacity > slice_get_capacity(storage_get_selected_slice(a->s))) {
inform(a->c, _("The space allocated to all of your selected "
- "subpartitions (%dM) exceeds the total "
+ "subpartitions (%luM) exceeds the total "
"capacity of the selected primary partition "
- "(%dM). Remove some subpartitions or choose "
+ "(%luM). Remove some subpartitions or choose "
"a smaller size for them and try again."),
total_capacity, slice_get_capacity(storage_get_selected_slice(a->s)));
return(0);
if (total_capacity > slice_get_capacity(storage_get_selected_slice(a->s))) {
inform(a->c, _("The space allocated to all of your selected "
- "subpartitions (%dM) exceeds the total "
+ "subpartitions (%luM) exceeds the total "
"capacity of the selected primary partition "
- "(%dM). Remove some subpartitions or choose "
+ "(%luM). Remove some subpartitions or choose "
"a smaller size for them and try again."),
total_capacity, slice_get_capacity(storage_get_selected_slice(a->s)));
return(0);
void aura_buffer_cpy(struct aura_buffer *, const char *);
void aura_buffer_cat(struct aura_buffer *, const char *);
-int aura_buffer_cat_file(struct aura_buffer *, const char *, ...);
-int aura_buffer_cat_pipe(struct aura_buffer *, const char *, ...);
+int aura_buffer_cat_file(struct aura_buffer *, const char *, ...)
+ __printflike(2, 3);
+int aura_buffer_cat_pipe(struct aura_buffer *, const char *, ...)
+ __printflike(2, 3);
int aura_buffer_seek(struct aura_buffer *, size_t);
size_t aura_buffer_tell(struct aura_buffer *);
/*** PROTOTYPES ***/
-int is_dir(const char *, ...);
-int is_file(const char *, ...);
-int is_program(const char *, ...);
-int is_device(const char *, ...);
-int is_named_pipe(const char *, ...);
+int is_dir(const char *, ...) __printflike(1, 2);
+int is_file(const char *, ...) __printflike(1, 2);
+int is_program(const char *, ...) __printflike(1, 2);
+int is_device(const char *, ...) __printflike(1, 2);
+int is_named_pipe(const char *, ...) __printflike(1, 2);
int is_mountpoint_mounted(const char *);
int is_device_mounted(const char *);
int is_any_slice_mounted(const char *);
#define AURA_PGETS_EOF 3
#define AURA_PGETS_FGETS_ERR 4
-FILE *aura_popen(const char *, const char *, ...);
+FILE *aura_popen(const char *, const char *, ...)
+ __printflike(1, 3);
int aura_pclose(FILE *);
pid_t aura_pgetpid(FILE *);
int aura_pgets(FILE *, char *, size_t, long, int *);
*/
int dfui_be_present_dialog(struct dfui_connection *,
- const char *, const char *, const char *, ...);
+ const char *, const char *, const char *, ...)
+ __printflike(4, 5);
/*
* BACKEND HIGH LEVEL INTERFACE
#define langcount (sizeof(langset) / sizeof(struct _langset))
static int get_lang_num(const char *langname);
-static int system_fmt(const char *fmt, ...);
+static int system_fmt(const char *fmt, ...) __printflike(1, 2);
static int
/*** PROTOTYPES ***/
struct commands *commands_new(void);
-struct command *command_add(struct commands *, const char *, ...);
+struct command *command_add(struct commands *, const char *, ...)
+ __printflike(2, 3);
void command_set_log_mode(struct command *, int);
void command_set_failure_mode(struct command *, int);
-void command_set_desc(struct command *, const char *, ...);
-void command_set_tag(struct command *, const char *, ...);
+void command_set_desc(struct command *, const char *, ...)
+ __printflike(2, 3);
+void command_set_tag(struct command *, const char *, ...)
+ __printflike(2, 3);
struct command *command_get_first(const struct commands *);
struct command *command_get_next(const struct command *);
/* Command Generators */
void unmount_all_under(struct i_fn_args *, struct commands *,
- const char *, ...);
+ const char *, ...) __printflike(3, 4);
#endif /* !__COMMANDS_H_ */
int config_var_set(struct config_vars *, const char *, const char *);
const char *config_var_get(const struct config_vars *, const char *);
int config_vars_write(const struct config_vars *, int,
- const char *, ...);
+ const char *, ...) __printflike(3, 4);
int config_vars_read(struct i_fn_args *,
- struct config_vars *, int,
- const char *, ...);
+ struct config_vars *, int, const char *, ...)
+ __printflike(4, 5);
#endif /* !__CONFED_H_ */
int, long, long, int);
struct subpartition *subpartition_new_hammer(struct slice *, const char *, long);
int subpartition_count(const struct slice *);
-struct subpartition *subpartition_find(const struct slice *, const char *, ...);
-struct subpartition *subpartition_of(const struct slice *, const char *, ...);
+struct subpartition *subpartition_find(const struct slice *, const char *, ...)
+ __printflike(2, 3);
+struct subpartition *subpartition_of(const struct slice *, const char *, ...)
+ __printflike(2, 3);
struct subpartition *subpartition_find_capacity(const struct slice *, long);
void subpartitions_free(struct slice *);
struct subpartition *subpartition_next(const struct subpartition *);
struct i_fn_args *i_fn_args_new(const char *, const char *, int, const char *);
void i_fn_args_free(struct i_fn_args *);
-void i_log(struct i_fn_args *, const char *, ...);
+void i_log(struct i_fn_args *, const char *, ...)
+ __printflike(2, 3);
/* General Utilities */
#ifndef __UIUTIL_H_
#define __UIUTIL_H_
-void inform(struct dfui_connection *, const char *, ...);
-int confirm_dangerous_action(struct dfui_connection *, const char *, ...);
+void inform(struct dfui_connection *, const char *, ...)
+ __printflike(2, 3);
+int confirm_dangerous_action(struct dfui_connection *, const char *, ...)
+ __printflike(2, 3);
#endif /* !__UIUTIL_H_ */