Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
upd.c File Reference
#include <linux/err.h>
#include <linux/uaccess.h>
#include <linux/math64.h>
#include "ubi.h"

Go to the source code of this file.

Functions

int ubi_start_update (struct ubi_device *ubi, struct ubi_volume *vol, long long bytes)
 
int ubi_start_leb_change (struct ubi_device *ubi, struct ubi_volume *vol, const struct ubi_leb_change_req *req)
 
int ubi_more_update_data (struct ubi_device *ubi, struct ubi_volume *vol, const void __user *buf, int count)
 
int ubi_more_leb_change_data (struct ubi_device *ubi, struct ubi_volume *vol, const void __user *buf, int count)
 

Function Documentation

int ubi_more_leb_change_data ( struct ubi_device ubi,
struct ubi_volume vol,
const void __user buf,
int  count 
)

ubi_more_leb_change_data - accept more data for atomic LEB change. : UBI device description object : volume description object : write data (user-space memory buffer) : how much bytes to write

This function accepts more data to the volume which is being under the "atomic LEB change" operation. It may be called arbitrary number of times until all data arrives. This function returns %0 in case of success, number of bytes written during the last call if the whole "atomic LEB change" operation has been successfully finished, and a negative error code in case of failure.

Definition at line 393 of file upd.c.

int ubi_more_update_data ( struct ubi_device ubi,
struct ubi_volume vol,
const void __user buf,
int  count 
)

ubi_more_update_data - write more update data. : UBI device description object : volume description object : write data (user-space memory buffer) : how much bytes to write

This function writes more data to the volume which is being updated. It may be called arbitrary number of times until all the update data arriveis. This function returns %0 in case of success, number of bytes written during the last call if the whole volume update has been successfully finished, and a negative error code in case of failure.

Definition at line 278 of file upd.c.

int ubi_start_leb_change ( struct ubi_device ubi,
struct ubi_volume vol,
const struct ubi_leb_change_req req 
)

ubi_start_leb_change - start atomic LEB change. : UBI device description object : volume description object : operation request

This function starts atomic LEB change operation. Returns zero in case of success and a negative error code in case of failure.

Definition at line 181 of file upd.c.

int ubi_start_update ( struct ubi_device ubi,
struct ubi_volume vol,
long long  bytes 
)

ubi_start_update - start volume update. : UBI device description object : volume description object : update bytes

This function starts volume update operation. If is zero, the volume is just wiped out. Returns zero in case of success and a negative error code in case of failure.

Definition at line 129 of file upd.c.