summaryrefslogtreecommitdiffstats
path: root/loader2/modules.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2005-03-02 01:06:06 +0000
committerPeter Jones <pjones@redhat.com>2005-03-02 01:06:06 +0000
commit7ae6c6e7f99be78cddd498695cabba175df5a6ea (patch)
tree66bb08b16415a3a72e5188e5d5843099bd6b6bbe /loader2/modules.c
parent0183f5c2e6fcd6ee0fc41f89db02035d4402206d (diff)
downloadanaconda-7ae6c6e7f99be78cddd498695cabba175df5a6ea.tar.gz
anaconda-7ae6c6e7f99be78cddd498695cabba175df5a6ea.tar.xz
anaconda-7ae6c6e7f99be78cddd498695cabba175df5a6ea.zip
more return value "handling"
Diffstat (limited to 'loader2/modules.c')
-rw-r--r--loader2/modules.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/loader2/modules.c b/loader2/modules.c
index a3ae5ef34..09ed3cd19 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -620,7 +620,7 @@ int mlLoadModuleSetLocation(const char * modNames,
}
static int writeModulesConf(moduleList list, int fd) {
- int i;
+ int i, ret;
struct loadedModuleInfo * lm;
int ethNum;
int scsiNum = scsiCount();
@@ -656,7 +656,7 @@ static int writeModulesConf(moduleList list, int fd) {
strcat(buf, lm->name);
strcat(buf, "\n");
- write(fd, buf, strlen(buf));
+ ret = write(fd, buf, strlen(buf));
lm->written = 1;
break;
@@ -688,7 +688,7 @@ static int writeModulesConf(moduleList list, int fd) {
strcat(buf, lm->name);
strcat(buf, "\n");
- write(fd, buf, strlen(buf));
+ ret = write(fd, buf, strlen(buf));
lm->written = 1;
break;
@@ -707,7 +707,7 @@ static int writeModulesConf(moduleList list, int fd) {
strcat(buf, *arg);
}
strcat(buf, "\n");
- write(fd, buf, strlen(buf));
+ ret = write(fd, buf, strlen(buf));
lm->written = 1;
}
}
@@ -719,7 +719,7 @@ static int writeModulesConf(moduleList list, int fd) {
* format is sd%c adapter
*/
void writeScsiDisks(moduleList list) {
- int i, fd, num;
+ int i, fd, num, ret;
struct loadedModuleInfo * lm;
char buf[512];
@@ -745,7 +745,7 @@ void writeScsiDisks(moduleList list) {
sprintf(buf, "sd%c%c\t%s\n", 'a' + one - 1,
'a' + two, lm->name);
}
- write(fd, buf, strlen(buf));
+ ret = write(fd, buf, strlen(buf));
}
}
@@ -758,6 +758,7 @@ char * getModuleLocation(int version) {
static char * arch = NULL;
const char * archfile = "/etc/arch";
char * ret;
+ int rc;
uname(&u);
@@ -769,7 +770,7 @@ char * getModuleLocation(int version) {
arch = malloc(sb.st_size + 1);
fd = open(archfile, O_RDONLY);
- read(fd, arch, sb.st_size);
+ rc = read(fd, arch, sb.st_size);
if (arch[sb.st_size -1 ] == '\n')
sb.st_size--;
arch[sb.st_size] = '\0';