aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaolo \'Blaisorblade\' Giarrusso <blaisorblade_spam@yahoo.it>2005-01-14 23:29:34 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 23:29:34 -0800
commitfd9f92dff48083d4c7762f662823684b5820f251 (patch)
tree4d284020de42e54ad7443c3253d9dd54c40eee43 /arch
parent13806b0306190e8f0a837e2788c757f67d00d34a (diff)
downloadhistory-fd9f92dff48083d4c7762f662823684b5820f251.tar.gz
[PATCH] uml: for ubd cmdline param use colon as delimiter
Currently we can use this syntax ubd<n>[<flags>]=file1,file2. However, writing things as ubd0=~/Uml/file1,~/Uml/file2 does not work; in fact, the shell won't expand the second '~', since it's not at a path beginning; possibly even other shell expansions don't work here. So simply allow using, instead of the ',' separator, the ':' separator. The ',' separator can still be used to preserve backward compatibility. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/ubd_kern.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 17d85730086b81..d0e06c0556c5a1 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -337,6 +337,11 @@ static int ubd_setup_common(char *str, int *index_out)
err = 0;
backing_file = strchr(str, ',');
+
+ if (!backing_file) {
+ backing_file = strchr(str, ':');
+ }
+
if(backing_file){
if(dev->no_cow)
printk(KERN_ERR "Can't specify both 'd' and a "
@@ -362,13 +367,22 @@ static int ubd_setup(char *str)
__setup("ubd", ubd_setup);
__uml_help(ubd_setup,
-"ubd<n>=<filename>\n"
+"ubd<n><flags>=<filename>[(:|,)<filename2>]\n"
" This is used to associate a device with a file in the underlying\n"
-" filesystem. Usually, there is a filesystem in the file, but \n"
+" filesystem. When specifying two filenames, the first one is the\n"
+" COW name and the second is the backing file name. As separator you can\n"
+" use either a ':' or a ',': the first one allows writing things like;\n"
+" ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n"
+" while with a ',' the shell would not expand the 2nd '~'.\n"
+" When using only one filename, UML will detect whether to thread it like\n"
+" a COW file or a backing file. To override this detection, add the 'd'\n"
+" flag:\n"
+" ubd0d=BackingFile\n"
+" Usually, there is a filesystem in the file, but \n"
" that's not required. Swap devices containing swap files can be\n"
" specified like this. Also, a file which doesn't contain a\n"
" filesystem can have its contents read in the virtual \n"
-" machine by running dd on the device. n must be in the range\n"
+" machine by running 'dd' on the device. <n> must be in the range\n"
" 0 to 7. Appending an 'r' to the number will cause that device\n"
" to be mounted read-only. For example ubd1r=./ext_fs. Appending\n"
" an 's' (has to be _after_ 'r', if there is one) will cause data\n"