Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Index: mod-sata.sh
  2. ===================================================================
  3. --- mod-sata.sh (revision 12142)
  4. +++ mod-sata.sh (working copy)
  5. @@ -51,10 +51,18 @@
  6. # 0107 - SAS
  7. local m modules=$(find_modules_by_class 0106)
  8.  
  9. - # FIXME: how to handle if multiple modules returned?
  10. - # i.e two modules can do same id
  11. - # currently we load all of them...
  12. + # sort modules that ones who depend on libata are first
  13. + # this is best we could think of now :)
  14. + local left right
  15. for m in $modules; do
  16. + if NEW_MODINFO=1 modinfo -k $kernel -F depends $m | grep -q libata; then
  17. + left="$left $m"
  18. + else
  19. + right="$right $m"
  20. + fi
  21. + done
  22. +
  23. + for m in $left $right; do
  24. find_module $m
  25. done
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement