futility/updater_archive.c
/* Returns the VPD value by given key name, or NULL on error (or no value). */
Returns the VPD value by given key name, or NULL on error (or no value).
Returns the VPD value by given key name or NULL on error ( or no value ) .
static char *vpd_get_value(const char *fpath, const char *key)
{
	char *command, *result;
	assert(fpath);
	ASPRINTF(&command, "vpd -g %s -f %s 2>/dev/null", key, fpath);
	result = host_shell(command);
	free(command);
	if (result && !*result) {
		free(result);
		result = NULL;
	}
	return result;
}
static char * vpd_get_value ( const char * fpath , const char * key ) { char * command , * result ; assert ( fpath ) ; ASPRINTF ( & command , " " , key , fpath ) ; result = host_shell ( command ) ; free ( command ) ; if ( result && ! * result ) { free ( result ) ; result = NULL ; } return result ; }
Returns the VPD value by given key name, or NULL on error (or no value).
Returns the VPD value by given key name or NULL on error ( or no value ) .