[haiku-commits] Re: haiku: hrev47468 - src/system/kernel/disk_device_manager

  • From: Gerasim Troeglazov <3deyes@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 6 Jul 2014 10:44:08 +1100

>
> @@ -69,6 +69,11 @@ KPartitioningSystem::Identify(KPartition *partition,
> void **cookie)
>         int fd = -1;
>         if (partition->Open(O_RDONLY, &fd) != B_OK)
>                 return -1;
> +
> +       // if BlockSize is 0, identify_partition will cause a KDL
> +       if (partition->BlockSize() == 0)
> +               return -1;
> +
>         float result = fModule->identify_partition(fd,
> partition->PartitionData(),
>                 cookie);
>         close(fd);
>

When the partition->BlockSize() == 0 the function will return until the
handle is closed.

Other related posts: