From 7d3dcb8b4f3e617d60b753757e97f16325b77f4b Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 6 Dec 2012 13:47:56 -0500 Subject: [PATCH] Changed quoting mechanism for quoting quote marks in configuration files. --- NEWS.txt | 9 +++++- docs/refind/configfile.html | 2 +- docs/refind/linux.html | 2 +- docs/refind/revisions.html | 2 +- refind/config.c | 55 +++++++++++++++++++++++++++---------- refind/main.c | 2 +- 6 files changed, 53 insertions(+), 19 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 6f3e466..1a4d568 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,13 @@ -0.5.0 (12/5/2012): +0.5.0 (12/?/2012): ------------------ +- Added the ability to include quote marks ('"') in refind.conf and + refind_linux.conf tokens by doubling them up, as in: + "ro root=/dev/sda4 some_value=""this is it""" + This example results in the following string being passed as an + option: + ro root=/dev/sda4 some_value="this is it" + - Changed refind.conf-sample to uncomment the scan_all_linux_kernels option by default. If this option is deleted or commented out, the program default remains to not scan all Linux kernels; but with diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index ee0805b..04c144e 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -305,7 +305,7 @@ default_selection elilo options options passed to the boot loader - Pass arbitrary options to your boot loader with this line. Note that if the option string should contain spaces (as it often should) or characters that should not be modified by rEFInd's option parser (such as slashes or commas), it must be enclosed in quotes. + Pass arbitrary options to your boot loader with this line. Note that if the option string should contain spaces (as it often should) or characters that should not be modified by rEFInd's option parser (such as slashes or commas), it must be enclosed in quotes. If you must include quotes in an option, you can double them up, as in my_opt=""with quotes"", which passes my_opt="with quotes" as an option. disabled diff --git a/docs/refind/linux.html b/docs/refind/linux.html index d702c0a..011611a 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -186,7 +186,7 @@ total 17943 # "Boot alternate install" "root=/dev/sdb9 ro quiet splash vt.handoff=7" -

Ordinarily, both fields in this file must be enclosed in quotes. You can include as much white space as you like between options. You can also place comments in the file, or remove an option by commenting it out with a leading hash mark (#), as in the fourth line in this example.

+

Ordinarily, both fields in this file must be enclosed in quotes. If you have to pass an option that includes quotes, you can do so by doubling up on them, as in "root=/dev/sdb9 my_opt=""this is it""", which passes root=/dev/sdb9 my_opt="this is it" to the shell. You can include as much white space as you like between options. You can also place comments in the file, or remove an option by commenting it out with a leading hash mark (#), as in the fourth line in this example.

In the preceding example, the first line sets the options that rEFInd passes to the kernel by default (along with the name of the initrd.img-3.3.0 file, since its version string matches that of the kernel). The next two lines set options that you can obtain by pressing Insert, F2, or + on the main menu, as shown here:

diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index e0cbbbb..a87c5de 100644 --- a/docs/refind/revisions.html +++ b/docs/refind/revisions.html @@ -93,7 +93,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com