diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-21 12:49:59 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-21 12:49:59 +0000 |
commit | e8635a732af4bb7b41be4d9b7cb4ee5cac3fdbd6 (patch) | |
tree | 692c0df3a43264717eb13fc0b46ec9a23eb50830 /sys/src | |
parent | 0aa4074bc1cc7b86f7ed28df9ac6dedd85eb4bb9 (diff) |
boot(8): use first detected filesystem as bootargs default
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/boot/local.rc | 10 |
1 files changed, 7 insertions, 3 deletions
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 + } } } } |