summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-02-14 00:45:32 +0000
committerMiles Bader <miles@gnu.org>1996-02-14 00:45:32 +0000
commit5607941c24e64c1dcfa30480f629c1d515ddeffc (patch)
tree1f5a2f0dd7b6b81604002d7e3affffb518063e6f /boot
parentc93100eaaf923100eb3d4ff249379d41ef3ba799 (diff)
(load_image, boot_script_read_file, main):
Use O_RDONLY, not 0 (kind of ironic, this...). (load_image): Give the filename with the error message (and a newline).
Diffstat (limited to 'boot')
-rw-r--r--boot/boot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/boot/boot.c b/boot/boot.c
index dfd8a156..70c600f3 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -168,14 +168,14 @@ load_image (task_t t,
struct exec a;
Elf32_Ehdr e;
} hdr;
- char msg[] = "cannot open bootstrap file";
+ char msg[] = ": cannot open bootstrap file\n";
-
- fd = useropen (file, 0, 0);
+ fd = useropen (file, O_RDONLY, 0);
if (fd == -1)
{
- write (2, msg, sizeof (msg));
+ write (2, file, strlen (file));
+ write (2, msg, sizeof msg - 1);
task_terminate (t);
host_exit (1);
}
@@ -268,7 +268,7 @@ mach_port_t
boot_script_read_file (const char *filename)
{
static const char msg[] = ": cannot open\n";
- int fd = useropen (filename, 0, 0);
+ int fd = useropen (filename, O_RDONLY, 0);
host_stat_t st;
error_t err;
mach_port_t memobj;
@@ -453,7 +453,7 @@ main (int argc, char **argv, char **envp)
static const char filemsg[] = "Can't open boot script";
int amt, fd, err;
- fd = open (bootscript, 0, 0);
+ fd = open (bootscript, O_RDONLY, 0);
if (fd < 0)
{
write (2, filemsg, sizeof (filemsg));