[PATCH] powerpc: initialize drconf variables

Bernhard Walle bwalle at suse.de
Wed Feb 4 11:48:56 EST 2009


* Chandru [2009-02-04 17:16:28]:
>
> +	strcpy(fname, "/proc/device-tree/");
> +	strcat(fname, "ibm,dynamic-reconfiguration-memory/ibm,lmb-size");
> +	if ((file = fopen(fname, "r")) == NULL) {
> +		perror(fname);
> +		return -1;
> +	}
> +	if (fread(buf, 1, 8, file) < 0) {

    fread(buf, 1, 8, file) != 8

>  	}
> +	/* first 4 bytes tell the number of lmbs */
> +	if (fread(buf, 1, 4, file) < 0) {

    fread(buf, 1, 4, file) != 4 


Regards,
Bernhard




More information about the kexec mailing list