chenall / grub4dos

外部命令和工具源码:https://github.com/chenall/grubutils 下载:
http://grub4dos.chenall.net
GNU General Public License v2.0
640 stars 135 forks source link

find --devices doesn't really order the result #93

Open liloman opened 8 years ago

liloman commented 8 years ago

Hi,

I have found an issue that's causing my troubles:

grub>find --devices=hc /myfile.txt
(cd)
(hd0,1)

It's the same as:

grub>find --devices=ch /myfile.txt
(cd)
(hd0,1)

Cheers and nice piece of software :wave:

liloman commented 8 years ago

My bad for not looking first on the source.

Looking on the code is crystal clear that it's searching into the set-root device first.

Shouldn't it respect the order of --devices??

Anyway I reckon I can fix my menus. ;)

chenall commented 8 years ago

because find will find current root first so find --devices=ch /myfiles.txt if root is (hd0,0),it find (hd0,0) first.

liloman commented 8 years ago

Yeah that is what I figured out so I patched it to not search for the current root first and problem solved.

By the way It will be nice to have this option. :smirk:

steve6375 commented 7 years ago

maybe try

rootnoverify (rd)
find --devices=ch /myfiles.txt