|
|
7140c6 |
From ccd61ebfd97fde43768497c79e3d361b484b1520 Mon Sep 17 00:00:00 2001
|
|
|
7140c6 |
From: Xiao Ni <xni@redhat.com>
|
|
|
7140c6 |
Date: Tue, 22 Jun 2021 23:15:55 +0800
|
|
|
7140c6 |
Subject: [PATCH 13/15] mdadm: Fix building errors
|
|
|
7140c6 |
|
|
|
7140c6 |
In util.c, there is a building error:
|
|
|
7140c6 |
'/md/metadata_version' directive writing 20 bytes into a
|
|
|
7140c6 |
region of size between 0 and 255 [-Werror=format-overflow=]
|
|
|
7140c6 |
|
|
|
7140c6 |
In mapfile.c
|
|
|
7140c6 |
It declares the fouth argument as 'int *' in map_update,
|
|
|
7140c6 |
but in mdadm.h it's previously declared as an array 'int[4]'
|
|
|
7140c6 |
|
|
|
7140c6 |
Signed-off-by: Xiao Ni <xni@redhat.com>
|
|
|
7140c6 |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
7140c6 |
---
|
|
|
7140c6 |
mapfile.c | 2 +-
|
|
|
7140c6 |
util.c | 2 +-
|
|
|
7140c6 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
7140c6 |
|
|
|
7140c6 |
diff --git a/mapfile.c b/mapfile.c
|
|
|
7140c6 |
index 8d7acb3..6b2207d 100644
|
|
|
7140c6 |
--- a/mapfile.c
|
|
|
7140c6 |
+++ b/mapfile.c
|
|
|
7140c6 |
@@ -215,7 +215,7 @@ void map_free(struct map_ent *map)
|
|
|
7140c6 |
}
|
|
|
7140c6 |
|
|
|
7140c6 |
int map_update(struct map_ent **mpp, char *devnm, char *metadata,
|
|
|
7140c6 |
- int *uuid, char *path)
|
|
|
7140c6 |
+ int uuid[4], char *path)
|
|
|
7140c6 |
{
|
|
|
7140c6 |
struct map_ent *map, *mp;
|
|
|
7140c6 |
int rv;
|
|
|
7140c6 |
diff --git a/util.c b/util.c
|
|
|
7140c6 |
index 5879694..cdf1da2 100644
|
|
|
7140c6 |
--- a/util.c
|
|
|
7140c6 |
+++ b/util.c
|
|
|
7140c6 |
@@ -1543,7 +1543,7 @@ int open_container(int fd)
|
|
|
7140c6 |
/* 'fd' is a block device. Find out if it is in use
|
|
|
7140c6 |
* by a container, and return an open fd on that container.
|
|
|
7140c6 |
*/
|
|
|
7140c6 |
- char path[256];
|
|
|
7140c6 |
+ char path[288];
|
|
|
7140c6 |
char *e;
|
|
|
7140c6 |
DIR *dir;
|
|
|
7140c6 |
struct dirent *de;
|
|
|
7140c6 |
--
|
|
|
7140c6 |
2.7.5
|
|
|
7140c6 |
|