From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
To: neilb@suse.de, piergiorgio.sartor@nexgo.de
Cc: linux-raid@vger.kernel.org
Subject: [PATCH 1/6] raid6check: Fix build of raid6check
Date: Tue, 18 Jun 2013 11:09:16 +0200 [thread overview]
Message-ID: <20130618090916.1161109.53519.stgit@fsdevel7.hpc.devnet.itwm.fhg.de> (raw)
In-Reply-To: <20130618090910.1161109.69430.stgit@fsdevel7.hpc.devnet.itwm.fhg.de>
After recent git pull 'make raid6check' did not work anymore, as
sysfs_read() was called with a wrong argument and as check_env()
was used by use_udev(), but not defined.
Replace sysfs_read(..., -1, ...) by sysfs_read(..., NULL, ...)
Move check_env() from util.c to lib.c
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
---
lib.c | 10 ++++++++++
raid6check.c | 2 +-
util.c | 10 ----------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib.c b/lib.c
index 1958029..2c3d936 100644
--- a/lib.c
+++ b/lib.c
@@ -378,6 +378,16 @@ void print_escape(char *str)
}
}
+int check_env(char *name)
+{
+ char *val = getenv(name);
+
+ if (val && atoi(val) == 1)
+ return 1;
+
+ return 0;
+}
+
int use_udev(void)
{
static int use = -1;
diff --git a/raid6check.c b/raid6check.c
index e9a17a7..f5aeee4 100644
--- a/raid6check.c
+++ b/raid6check.c
@@ -386,7 +386,7 @@ int main(int argc, char *argv[])
goto exitHere;
}
- info = sysfs_read(mdfd, -1,
+ info = sysfs_read(mdfd, NULL,
GET_LEVEL|
GET_LAYOUT|
GET_DISKS|
diff --git a/util.c b/util.c
index 3ac63e3..7da69ac 100644
--- a/util.c
+++ b/util.c
@@ -1798,16 +1798,6 @@ int start_mdmon(char *devnm)
return 0;
}
-int check_env(char *name)
-{
- char *val = getenv(name);
-
- if (val && atoi(val) == 1)
- return 1;
-
- return 0;
-}
-
__u32 random32(void)
{
__u32 rv;
next prev parent reply other threads:[~2013-06-18 9:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 9:09 [PATCH 0/6] raid6check fixes Bernd Schubert
2013-06-18 9:09 ` Bernd Schubert [this message]
2013-06-18 9:09 ` [PATCH 2/6] Makefile: Allow the user to pass EXTRA_CFLAGS Bernd Schubert
2013-06-19 0:07 ` NeilBrown
2013-06-19 9:48 ` Bernd Schubert
2013-06-24 7:01 ` NeilBrown
2013-06-18 9:09 ` [PATCH 3/6] raid6check: Fix memory leaks detected by valgrind Bernd Schubert
2013-06-18 9:09 ` [PATCH 4/6] raid6check: Use enums for repair type Bernd Schubert
2013-06-18 9:09 ` [PATCH 5/6] raid6check: Fix compiler warnings Bernd Schubert
2013-06-18 9:09 ` [PATCH 6/6] raid6check: Check return value of lseek64() Bernd Schubert
2013-06-18 17:16 ` [PATCH 0/6] raid6check fixes Piergiorgio Sartor
2013-06-19 0:08 ` NeilBrown
2013-06-20 16:16 ` Piergiorgio Sartor
2013-06-24 7:04 ` NeilBrown
2013-06-24 17:10 ` Piergiorgio Sartor
2013-06-24 23:54 ` NeilBrown
2013-06-25 16:46 ` Piergiorgio Sartor
2013-06-27 4:27 ` NeilBrown
2013-06-27 20:49 ` Piergiorgio Sartor
2013-06-27 21:12 ` NeilBrown
2013-06-28 17:46 ` Piergiorgio Sartor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130618090916.1161109.53519.stgit@fsdevel7.hpc.devnet.itwm.fhg.de \
--to=bernd.schubert@itwm.fraunhofer.de \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=piergiorgio.sartor@nexgo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).