diff options
author | jhb <jhb@FreeBSD.org> | 2001-12-11 00:49:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-12-11 00:49:34 +0000 |
commit | 8c6afa35bea1a5ea8a94a3c60d1988999cb41bcc (patch) | |
tree | 3d16cb8ac2303ccc50640d839778a81b153c89ec /sys/boot/common | |
parent | 991ffbae5691ddb93149381b3c23fcf0763b63bd (diff) | |
download | FreeBSD-src-8c6afa35bea1a5ea8a94a3c60d1988999cb41bcc.zip FreeBSD-src-8c6afa35bea1a5ea8a94a3c60d1988999cb41bcc.tar.gz |
- Add 'fwrite' and 'fseek' words for writing to and seeking on files.
- Change the 'fopen' keyword to accept a mode parameter. Note that this
will break existing 4th scripts that use fopen. Thus, the loader
version has been bumped and loader.4th has been changed to check for a
sufficient version on i386 and alpha. Be sure that you either do a full
world build or install or full build and install of sys/boot after this
since loader.old won't work with the new 4th files and vice versa.
PR: kern/32389
Submitted by: Jonathan Mini <mini@haikugeek.com>
Sponsored by: ClickArray, Inc.
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/loader.8 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/boot/common/loader.8 b/sys/boot/common/loader.8 index 1d70aca..85c214f 100644 --- a/sys/boot/common/loader.8 +++ b/sys/boot/common/loader.8 @@ -642,9 +642,19 @@ Reads a single character from a file. .It Ic fload Pq Ar fd -- Process file .Em fd . -.It Ic fopen Pq Ar addr len -- fd +.It Ic fopen Pq Ar addr len mode Li -- Ar fd Open a file. -Returns a file descriptor, or -1 in case of failure. +Returns a file descriptor, or \-1 in case of failure. The +.Ar mode +parameter selects whether the file is to be opened for read access, write +access, or both. +The constants +.Dv O_RDONLY , O_WRONLY , +and +.Dv O_RDWR +are defined in +.Pa /boot/support.4th , +indicating read only, write only, and read-write access, respectively. .It Xo .Ic fread .Pq Ar fd addr len -- len' |