Пример #1
0
int
nvram_getall(char *buf, int count)
{
	int ret;

	NVRAM_LOCK();
	ret = _nvram_getall(buf, count);
	NVRAM_UNLOCK();

	return ret;
}
Пример #2
0
int
nvram_getall(char *buf, int count)
{
	unsigned long flags;
	int ret;

	spin_lock_irqsave(&nvram_lock, flags);
	if (nvram_major >= 0)
		ret = _nvram_getall(buf, count);
	else
		ret = early_nvram_getall(buf, count);
	spin_unlock_irqrestore(&nvram_lock, flags);

	return ret;
}
Пример #3
0
int 
nvram_getall(char* buf, int count)
{
    int ret;
    
    if (nvram_header == NULL) {
        buf[0] = 0;
        return 0;
    }
    
    NVRAM_LOCK();
    ret = _nvram_getall(buf, count);
    NVRAM_UNLOCK();
    
    return ret;
}
Пример #4
0
int
nvram_getall(char *buf, int count)
{
	unsigned long flags;
	int ret;
	
	if (!buf || count < 1)
		return -EINVAL;

	memset(buf, 0, count);

	// Check early write
	if (nvram_major < 0)
		return 0;

	spin_lock_irqsave(&nvram_lock, flags);
	ret = _nvram_getall(buf, count);
	spin_unlock_irqrestore(&nvram_lock, flags);

	return ret;
}