]> git.saurik.com Git - apple/system_cmds.git/blobdiff - nvram.tproj/nvram.8
system_cmds-735.20.1.tar.gz
[apple/system_cmds.git] / nvram.tproj / nvram.8
index 7392f2e032907fbd748bf2c5ad9e3fac7c1c474d..74f7b389e592df5ec909632169e993bdd71a8022 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" Copyright (c) 2000 Apple Computer, Inc.  All rights reserved.
+.\" Copyright (c) 2000-2003 Apple Computer, Inc.  All rights reserved.
 .\"
-.TH nvram 8 "December 12, 2000"
+.TH nvram 8 "October 28, 2003"
 .SH NAME
-nvram \- manipulate Open Firmware NVRAM variables
+nvram \- manipulate firmware NVRAM variables
 .SH SYNOPSIS
 .B nvram
 [
@@ -12,23 +12,28 @@ nvram \- manipulate Open Firmware NVRAM variables
 .B -f 
 .IR filename
 ] [
+.B -d 
 .IR name
-] [=
+] [
+.B -c
+] [
+.IR name
+[=
 .IR value
-] ...
+]] ...
 .SH DESCRIPTION
 The
 .I nvram
-command allows manipulation of Open Firmware NVRAM variables.  It
+command allows manipulation of firmware NVRAM variables.  It
 can be used to get or set a variable.  It can also be used to print
 all of the variables or set a list of variables from a file.
+Changes to NVRAM variables are only saved by clean restart or shutdown.
 .LP
 In principle,
 .IR name
 can be any string.  In practice, not all strings will be accepted.
-Old world machines have a fixed set of Open Firmware variables.
-New World machines can create new varibles as desired.  Some variables
-require adminstrator privilege to get or set.
+New World machines can create new variables as desired.  Some variables
+require administrator privilege to get or set.
 .LP
 The given
 .IR value
@@ -37,53 +42,52 @@ must match the data type required for
 Binary data can be set using the %xx notation, where xx is the hex
 value of the byte.  The type for new variables is always binary
 data.
-.LP
-Two Open Firmware variables have special treatment on old world
-machines:
-.IR boot-command
-and
-.IR boot-args .
-As long as
-.IR boot-command
-starts with "# bootr," the
-.IR boot-args
-variable will be present.  Getting or setting
-.IR boot-args
-will get or set the
-.IR boot-command
-while preserving the "# bootr".  In most cases when setting boot arguments 
-for the kernel, there is no need to test for old world and set
-.IR boot-command .
-Instead set
-.IR boot-args
-with the desired arguments.
 .SH OPTIONS
+.\" ==========
 .TP
-.B \-p
-Print all of the Open Firmware variables.
+.BI \-d " name"
+Deletes the named firmware variable.
+.\" ==========
 .TP
 .BI \-f " filename"
-Set Open Firmware variables from a text file.  The file must be a
-list name=value statements.  If the last character of a line is
-\\, the value will be continued to the next line.
+Set firmware variables from a text file.  The file must be a
+list of "name value" statements.  The first space on each line
+is taken to be the separator between "name" and "value".  If
+the last character of a line is \\, the value extends to the next line.
+.\" ==========
+.TP
+.B \-x
+Use XML format for reading and writing variables.
+This option must be used before the
+.B \-p
+or
+.B \-f
+options, since arguments are processed in order.
+.TP
+.B \-c
+Delete all of the firmware variables.
+.TP
+.B \-p
+Print all of the firmware variables.
 .SH EXAMPLES
 .LP
 .RS
 example% nvram boot-args="-s rd=*hd:10"
 .RE
 .LP
-Set the boot-args variable to "-s rd=*hd:10".  This would specifiy
+Set the boot-args variable to "-s rd=*hd:10".  This would specify
 single user mode with the root device in hard drive partition 10.
 .LP
 .RS
 example% nvram my-variable="String One%00String Two%00%00"
 .RE
 .LP
-Create a new variable, my-variable, containging a list of two
+Create a new variable, my-variable, containing a list of two
 C-strings that is terminated by a NUL.
-.SH FILES
-.PD 0
-.TP 30
-.B /usr/share/nvram
-Files containing patches for old world machines.
+.LP
+.RS
+example% nvram -d my-variable
+.RE
+.LP
+Deletes the variable named my-variable.
 .PD