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)
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
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
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;
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
/*
* 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.
* 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
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) {
EMIT_PARAMS(*pos, " %s %u%s %" PRIu64, logtype,
log_parm_count, devbuf, area->region_size);
- logtype = (area->flags & DM_NOSYNC) ?
- " nosync" : (area->flags & DM_FORCESYNC) ?
- " sync" : NULL;
+ 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: