1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Extend deptree buffers so the largest possible device numbers fit.

This commit is contained in:
Alasdair Kergon 2008-09-02 12:16:07 +00:00
parent 3a2fb07349
commit 7d7d93ac6c
3 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.28 -
================================
Extend deptree buffers so the largest possible device numbers fit.
Added generation of the versioned libdevmapper-event.so for LVM's test
Underline longer report help text headings.

View File

@ -181,8 +181,9 @@ int dm_task_add_target(struct dm_task *dmt,
uint64_t size, const char *ttype, const char *params);
/*
* Format major/minor numbers correctly for input to driver
* Format major/minor numbers correctly for input to driver.
*/
#define DM_FORMAT_DEV_BUFSIZE 13 /* Minimum bufsize to handle worst case. */
int dm_format_dev(char *buf, int bufsize, uint32_t dev_major, uint32_t dev_minor);
/* Use this to retrive target information returned from a STATUS call */

View File

@ -1243,7 +1243,7 @@ static int _emit_areas_line(struct dm_task *dmt __attribute((unused)),
size_t paramsize, int *pos)
{
struct seg_area *area;
char devbuf[10];
char devbuf[DM_FORMAT_DEV_BUFSIZE];
int tw;
const char *prefix = "";
@ -1270,7 +1270,8 @@ static int _emit_segment_line(struct dm_task *dmt, struct load_segment *seg, uin
int pos = 0;
int tw;
int r;
char originbuf[10], cowbuf[10], logbuf[10];
char originbuf[DM_FORMAT_DEV_BUFSIZE], cowbuf[DM_FORMAT_DEV_BUFSIZE];
char logbuf[DM_FORMAT_DEV_BUFSIZE];
const char *logtype;
switch(seg->type) {