Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84284
b: refs/heads/master
c: ae616e1
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jan 25, 2008
1 parent c88cb61 commit 44b5a0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9a06623d9d0c6dff758d525ceb0d9e2bba8f7d6
refs/heads/master: ae616e1be13599c3b64e544ebe99e69ea851e99c
10 changes: 5 additions & 5 deletions trunk/drivers/mtd/ubi/cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count,
struct ubi_volume_desc *desc = file->private_data;
struct ubi_volume *vol = desc->vol;
struct ubi_device *ubi = vol->ubi;
int err, lnum, off, len, vol_id = desc->vol->vol_id, tbuf_size;
int err, lnum, off, len, tbuf_size;
size_t count_save = count;
void *tbuf;
uint64_t tmp;

dbg_msg("read %zd bytes from offset %lld of volume %d",
count, *offp, vol_id);
count, *offp, vol->vol_id);

if (vol->updating) {
dbg_err("updating");
Expand All @@ -204,7 +204,7 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count,
return 0;

if (vol->corrupted)
dbg_msg("read from corrupted volume %d", vol_id);
dbg_msg("read from corrupted volume %d", vol->vol_id);

if (*offp + count > vol->used_bytes)
count_save = count = vol->used_bytes - *offp;
Expand Down Expand Up @@ -268,13 +268,13 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf,
struct ubi_volume_desc *desc = file->private_data;
struct ubi_volume *vol = desc->vol;
struct ubi_device *ubi = vol->ubi;
int lnum, off, len, tbuf_size, vol_id = vol->vol_id, err = 0;
int lnum, off, len, tbuf_size, err = 0;
size_t count_save = count;
char *tbuf;
uint64_t tmp;

dbg_msg("requested: write %zd bytes to offset %lld of volume %u",
count, *offp, desc->vol->vol_id);
count, *offp, vol->vol_id);

if (vol->vol_type == UBI_STATIC_VOLUME)
return -EROFS;
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/mtd/ubi/kapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@ int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum)
{
struct ubi_volume *vol = desc->vol;
struct ubi_device *ubi = vol->ubi;
int err, vol_id = vol->vol_id;
int err;

dbg_msg("erase LEB %d:%d", vol_id, lnum);
dbg_msg("erase LEB %d:%d", vol->vol_id, lnum);

if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
return -EROFS;
Expand Down Expand Up @@ -541,9 +541,8 @@ int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum)
{
struct ubi_volume *vol = desc->vol;
struct ubi_device *ubi = vol->ubi;
int vol_id = vol->vol_id;

dbg_msg("unmap LEB %d:%d", vol_id, lnum);
dbg_msg("unmap LEB %d:%d", vol->vol_id, lnum);

if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
return -EROFS;
Expand Down Expand Up @@ -579,9 +578,8 @@ int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype)
{
struct ubi_volume *vol = desc->vol;
struct ubi_device *ubi = vol->ubi;
int vol_id = vol->vol_id;

dbg_msg("unmap LEB %d:%d", vol_id, lnum);
dbg_msg("unmap LEB %d:%d", vol->vol_id, lnum);

if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
return -EROFS;
Expand Down

0 comments on commit 44b5a0b

Please sign in to comment.