diff -Nru os-prober-1.51ubuntu2/debian/changelog os-prober-1.51ubuntu3/debian/changelog --- os-prober-1.51ubuntu2/debian/changelog 2012-04-04 17:30:51.000000000 +0000 +++ os-prober-1.51ubuntu3/debian/changelog 2012-04-04 22:34:57.000000000 +0000 @@ -1,3 +1,11 @@ +os-prober (1.51ubuntu3) precise; urgency=low + + * When called with WINOSDATA, return the list of Windows partitions + containing the system instead of only listing these containing the + bootrecord. (LP: #772470) + + -- Stéphane Graber Wed, 04 Apr 2012 18:34:56 -0400 + os-prober (1.51ubuntu2) precise; urgency=low * Add support for Windows 8. diff -Nru os-prober-1.51ubuntu2/os-probes/mounted/x86/20microsoft os-prober-1.51ubuntu3/os-probes/mounted/x86/20microsoft --- os-prober-1.51ubuntu2/os-probes/mounted/x86/20microsoft 2012-04-04 17:18:05.000000000 +0000 +++ os-prober-1.51ubuntu3/os-probes/mounted/x86/20microsoft 2012-04-04 18:28:53.000000000 +0000 @@ -100,6 +100,29 @@ found=true fi + +# Restrict to partitions containing the OS +if [ -n "$WINOSDATA" ]; then + found= + if [ -d "$2/ProgramData/Microsoft/Windows/Start Menu/Programs/StartUp" ]; then + long=${long:-"Windows 8 (data)"} + short=${short:-"Windows"} + found=true + elif [ -d "$2/ProgramData/Microsoft/Windows/Start Menu/Programs/Startup" ]; then + long=${long:-"Windows 7 (data)"} + short=${short:-"Windows"} + found=true + elif [ -d "$2/Documents and Settings/All Users/Start Menu/Programs/Startup" ]; then + long=${long:-"Windows XP/Vista (data)"} + short=${short:-"Windows"} + found=true + elif [ -d "$2/Winnt/Profiles/All Users/Start Menu/Programs/Startup" ]; then + long=${long:-"Windows NT (data)"} + short=${short:-"Windows"} + found=true + fi +fi + if [ -z "$found" ]; then exit 1 fi