From: Zdenek Kabelac <zkabelac@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - dev-type: print log_sys_debug
Date: Fri, 4 Jul 2014 10:32:04 +0000 (UTC) [thread overview]
Message-ID: <20140704103204.1476260C22@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a94abc0fdd33b31cd292d9b9a61ddceb7b72208f
Commit: a94abc0fdd33b31cd292d9b9a61ddceb7b72208f
Parent: ac60c876c43d0ebc7e642dcc92528b974bd7b9f5
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Thu Jul 3 12:03:16 2014 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Jul 4 12:31:17 2014 +0200
dev-type: print log_sys_debug
For non-fatal error use log_sys_debug as the tool
is not stopping on these errors.
---
lib/device/dev-type.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index e0cae45..0d91017 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -676,7 +676,7 @@ static unsigned long _dev_topology_attribute(struct dev_types *dt,
*/
if (stat(path, &info) == -1) {
if (errno != ENOENT) {
- log_sys_error("stat", path);
+ log_sys_debug("stat", path);
return 0;
}
if (!dev_get_primary_dev(dt, dev, &primary))
@@ -688,24 +688,23 @@ static unsigned long _dev_topology_attribute(struct dev_types *dt,
if (stat(path, &info) == -1) {
if (errno != ENOENT)
- log_sys_error("stat", path);
+ log_sys_debug("stat", path);
return 0;
}
}
if (!(fp = fopen(path, "r"))) {
- log_sys_error("fopen", path);
+ log_sys_debug("fopen", path);
return 0;
}
if (!fgets(buffer, sizeof(buffer), fp)) {
- log_sys_error("fgets", path);
+ log_sys_debug("fgets", path);
goto out;
}
if (sscanf(buffer, "%lu", &result) != 1) {
- log_error("sysfs file %s not in expected format: %s", path,
- buffer);
+ log_warn("sysfs file %s not in expected format: %s", path, buffer);
goto out;
}
@@ -714,7 +713,7 @@ static unsigned long _dev_topology_attribute(struct dev_types *dt,
out:
if (fclose(fp))
- log_sys_error("fclose", path);
+ log_sys_debug("fclose", path);
return result >> SECTOR_SHIFT;
}
next reply other threads:[~2014-07-04 10:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 10:32 Zdenek Kabelac [this message]
2014-07-04 17:22 ` master - dev-type: print log_sys_debug Alasdair G Kergon
2014-07-04 20:15 ` Zdenek Kabelac
2014-07-04 23:42 ` Alasdair G Kergon
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=20140704103204.1476260C22@fedorahosted.org \
--to=zkabelac@fedoraproject.org \
--cc=lvm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.