summaryrefslogtreecommitdiffstats
path: root/loader2/modstubs.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-08-13 00:52:40 +0000
committerChris Lumens <clumens@redhat.com>2005-08-13 00:52:40 +0000
commit26091625f3cf24dc0ba5bf655a83a868c5b20e89 (patch)
treea492c91713966c8050f0cee47cad79e87d15dbea /loader2/modstubs.c
parenta96d25d6bdae5703ff8d9ee5993d9942f2a6a48d (diff)
downloadanaconda-26091625f3cf24dc0ba5bf655a83a868c5b20e89.tar.gz
anaconda-26091625f3cf24dc0ba5bf655a83a868c5b20e89.tar.xz
anaconda-26091625f3cf24dc0ba5bf655a83a868c5b20e89.zip
Support logging levels in the loader just like in the python parts of the
installer. Also make the output look the same. This isn't going to be nearly as sophisticated as the python logging module, but it will at least behave similarly with command line options.
Diffstat (limited to 'loader2/modstubs.c')
-rw-r--r--loader2/modstubs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/loader2/modstubs.c b/loader2/modstubs.c
index f27999585..f4a345411 100644
--- a/loader2/modstubs.c
+++ b/loader2/modstubs.c
@@ -114,19 +114,19 @@ int ourInsmodCommand(int argc, char ** argv) {
free(ballPath);
if (stat(file, &sb) == -1) {
- logMessage("unable to stat file %s: %s", file, strerror(errno));
+ logMessage(ERROR, "unable to stat file %s: %s", file, strerror(errno));
return 1;
}
fd = open(file, O_RDONLY);
if (fd < 0) {
- logMessage("unable to open file %s: %s", file, strerror(errno));
+ logMessage(ERROR, "unable to open file %s: %s", file, strerror(errno));
return 1;
}
modbuf = mmap(0, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
if (modbuf == NULL) {
- logMessage("error reading file %s: %s", file, strerror(errno));
+ logMessage(ERROR, "error reading file %s: %s", file, strerror(errno));
return 1;
}
@@ -137,7 +137,7 @@ int ourInsmodCommand(int argc, char ** argv) {
rc = init_module(modbuf, sb.st_size, "");
}
if (rc != 0)
- logMessage("failed to insert module (%d)", errno);
+ logMessage(ERROR, "failed to insert module (%d)", errno);
return rc;
}