From e8635a732af4bb7b41be4d9b7cb4ee5cac3fdbd6 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 21 Apr 2011 12:49:59 +0000 Subject: [PATCH] boot(8): use first detected filesystem as bootargs default --- sys/lib/dist/pc/plan9.ini.cd | 6 ------ sys/src/9/boot/local.rc | 10 +++++++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/lib/dist/pc/plan9.ini.cd b/sys/lib/dist/pc/plan9.ini.cd index e6250449e..1828f9b33 100644 --- a/sys/lib/dist/pc/plan9.ini.cd +++ b/sys/lib/dist/pc/plan9.ini.cd @@ -1,13 +1,7 @@ # config for initial cd booting -# very cautious settings to get started. -# will defeat booting from usb devices. *nodumpstack=1 -partition=new mouseport=ask monitor=ask vgasize=ask cdboot=yes -# console=0 -# baud=9600 -bootargs=local!#S/sdD0/data bootfile=/386/9pcf diff --git a/sys/src/9/boot/local.rc b/sys/src/9/boot/local.rc index 43c7b2098..d17584735 100644 --- a/sys/src/9/boot/local.rc +++ b/sys/src/9/boot/local.rc @@ -6,9 +6,13 @@ fn showlocaldevs{ if(test -r $c){ d=`{echo $c | sed 's,/ctl,,g'} echo $d':' `{sed 's/inquiry[ ]+//g; q' $c} - for(i in `{ls -p $d | grep -v -e 'ctl|raw'}) - echo $d'/'$i `{fstype $d'/'$i} - echo + for(i in `{ls -p $d | grep -v -e 'ctl|raw'}){ + p=$d/$i + t=`{fstype $p} + if(~ $#bootargs 0 && ! ~ $t '') + bootargs=local!$p + echo $p $t + } } } }