Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/i386/stand/efiboot



Emmanuel Dreyfus wrote:

> In src/sys/arch/i386/stand/lib/biosdisk.c
> int
> biosdisk_findpartition(int biosdev, daddr_t sector,
>                        int *partition, const char **part_name)
> {
> (...)
>         /* default ot first partition */
>         *partition = 0;
>         *part_name = NULL;
>
> part_name is NULL, *part_name crashes. How do you avoid that?

Aha, I have this elsewhere in my zfs tree:

        *partition = 0;
-       *part_name = NULL;
+       if (part_name)
+               *part_name = NULL;

I'll commit that now (as well as the same check for the
NO_DISKLABEL && NO_GPT case.  Thanks for the digging!

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index