Skip to content

Commit

Permalink
[driver] Wait for the correct disk to show up, rather than any disk
Browse files Browse the repository at this point in the history
check_system_disk() neglects to set the status to a non-success value
before checking the disk signature, with the result that it will
return success as soon as fetch_partition_info() succeeds for any
disk.  (This is incorrect behaviour, but will have observable effects
only in a multi-disk setup where the SAN disks come online at
different times.)

Fix by setting status to STATUS_UNSUCCESSFUL before checking the disk
signature.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
  • Loading branch information
mcb30 committed Sep 14, 2010
1 parent e604684 commit a6acfce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/driver/sanbootconf.c
Expand Up @@ -292,6 +292,9 @@ static NTSTATUS check_system_disk ( PUNICODE_STRING name,
status = fetch_partition_info ( name, device, file, &info );
if ( ! NT_SUCCESS ( status ) )
goto err_fetch_partition_info;

/* Check for a matching disk signature */
status = STATUS_UNSUCCESSFUL;
switch ( info.PartitionStyle ) {
case PARTITION_STYLE_MBR:
DbgPrint ( " MBR %08lx: \"%wZ\"\n",
Expand Down

0 comments on commit a6acfce

Please sign in to comment.