mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add printf format attributes to yes_no_prompt & dm_{sn,as}printf and fix a calle
This commit is contained in:
parent
d99d4bd026
commit
db3c1ac1c8
@ -1,5 +1,6 @@
|
||||
Version 2.02.70 -
|
||||
================================
|
||||
Add printf format attributes to yes_no_prompt and fix a caller.
|
||||
Always pass unsuspended dm devices through persistent filter to other filters.
|
||||
Move test for suspended dm devices ahead of other filters.
|
||||
Fix another segfault in clvmd -R if no response from daemon received. (2.02.68)
|
||||
|
@ -1,5 +1,6 @@
|
||||
Version 1.02.52 -
|
||||
================================
|
||||
Add printf format attributes to dm_{sn,as}printf and fix a caller.
|
||||
Move dmeventd man page from install_lvm2 to install_device-mapper. (1.02.50)
|
||||
|
||||
Version 1.02.51 - 30th June 2010
|
||||
|
@ -59,6 +59,6 @@ void display_segtypes(const struct cmd_context *cmd);
|
||||
const char *get_alloc_string(alloc_policy_t alloc);
|
||||
alloc_policy_t get_alloc_from_string(const char *str);
|
||||
|
||||
char yes_no_prompt(const char *prompt, ...);
|
||||
char yes_no_prompt(const char *prompt, ...) __attribute__ ((format(printf, 1, 2)));
|
||||
|
||||
#endif
|
||||
|
@ -1543,7 +1543,7 @@ int remove_mirror_log(struct cmd_context *cmd,
|
||||
return 0;
|
||||
} else if (yes_no_prompt("Full resync required to convert "
|
||||
"inactive mirror %s to core log. "
|
||||
"Proceed? [y/n]: ") == 'y')
|
||||
"Proceed? [y/n]: ", lv->name) == 'y')
|
||||
sync_percent = 0;
|
||||
else
|
||||
return 0;
|
||||
|
@ -66,6 +66,7 @@ void dm_log_init_verbose(int level);
|
||||
typedef void (*dm_log_fn) (int level, const char *file, int line,
|
||||
const char *f, ...)
|
||||
__attribute__ ((format(printf, 4, 5)));
|
||||
|
||||
void dm_log_init(dm_log_fn fn);
|
||||
/*
|
||||
* For backward-compatibility, indicate that dm_log_init() was used
|
||||
@ -943,7 +944,8 @@ int dm_split_words(char *buffer, unsigned max,
|
||||
/*
|
||||
* Returns -1 if buffer too small
|
||||
*/
|
||||
int dm_snprintf(char *buf, size_t bufsize, const char *format, ...);
|
||||
int dm_snprintf(char *buf, size_t bufsize, const char *format, ...)
|
||||
__attribute__ ((format(printf, 3, 4)));
|
||||
|
||||
/*
|
||||
* Returns pointer to the last component of the path.
|
||||
@ -975,7 +977,8 @@ int dm_fclose(FILE *stream);
|
||||
* Pointer to the buffer is stored in *buf.
|
||||
* Returns -1 on failure leaving buf undefined.
|
||||
*/
|
||||
int dm_asprintf(char **buf, const char *format, ...);
|
||||
int dm_asprintf(char **buf, const char *format, ...)
|
||||
__attribute__ ((format(printf, 2, 3)));
|
||||
|
||||
/*********************
|
||||
* regular expressions
|
||||
|
@ -1442,7 +1442,7 @@ static int _emit_areas_line(struct dm_task *dmt __attribute((unused)),
|
||||
struct seg_area *area;
|
||||
char devbuf[DM_FORMAT_DEV_BUFSIZE];
|
||||
unsigned first_time = 1;
|
||||
const char *logtype;
|
||||
const char *logtype, *synctype;
|
||||
unsigned log_parm_count;
|
||||
|
||||
dm_list_iterate_items(area, &seg->areas) {
|
||||
@ -1475,12 +1475,12 @@ static int _emit_areas_line(struct dm_task *dmt __attribute((unused)),
|
||||
EMIT_PARAMS(*pos, " %s %u%s %" PRIu64, logtype,
|
||||
log_parm_count, devbuf, area->region_size);
|
||||
|
||||
logtype = (area->flags & DM_NOSYNC) ?
|
||||
synctype = (area->flags & DM_NOSYNC) ?
|
||||
" nosync" : (area->flags & DM_FORCESYNC) ?
|
||||
" sync" : NULL;
|
||||
|
||||
if (logtype)
|
||||
EMIT_PARAMS(*pos, logtype);
|
||||
if (synctype)
|
||||
EMIT_PARAMS(*pos, "%s", synctype);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user