Re: [PATCH v7 01/11] kconfig: Add PicoSAT interface

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

 



On Sat, Feb 08, 2025 at 05:39:49PM +0100, Ole Schuerks wrote:
> +bool load_picosat(void)
> +{
> +	void *handle = NULL;
> +	bool failed = false;
> +
> +	/*
> +	 * Try different names for the .so library. This is necessary since
> +	 * all packages don't use the same versioning.
> +	 */
> +	for (int i = 0; i < ARRAY_SIZE(picosat_lib_names) && !handle; ++i)
> +		handle = dlopen(picosat_lib_names[i], RTLD_LAZY);
> +	if (!handle) {
> +		printd("%s\n", dlerror());
> +		return false;
> +	}

This will only detect an error if the last dlopen() failed.

Other than that:

Reviewed-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>

 Luis




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux