|
@@ -63,7 +63,7 @@ static int get_exclusive(struct ubi_volume_desc *desc)
|
|
|
users = vol->readers + vol->writers + vol->exclusive;
|
|
|
ubi_assert(users > 0);
|
|
|
if (users > 1) {
|
|
|
- dbg_err("%d users for volume %d", users, vol->vol_id);
|
|
|
+ ubi_err("%d users for volume %d", users, vol->vol_id);
|
|
|
err = -EBUSY;
|
|
|
} else {
|
|
|
vol->readers = vol->writers = 0;
|
|
@@ -159,7 +159,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
|
|
|
|
|
|
if (vol->updating) {
|
|
|
/* Update is in progress, seeking is prohibited */
|
|
|
- dbg_err("updating");
|
|
|
+ ubi_err("updating");
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
|
|
@@ -178,7 +178,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
|
|
|
}
|
|
|
|
|
|
if (new_offset < 0 || new_offset > vol->used_bytes) {
|
|
|
- dbg_err("bad seek %lld", new_offset);
|
|
|
+ ubi_err("bad seek %lld", new_offset);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -216,11 +216,11 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count,
|
|
|
count, *offp, vol->vol_id);
|
|
|
|
|
|
if (vol->updating) {
|
|
|
- dbg_err("updating");
|
|
|
+ ubi_err("updating");
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
if (vol->upd_marker) {
|
|
|
- dbg_err("damaged volume, update marker is set");
|
|
|
+ ubi_err("damaged volume, update marker is set");
|
|
|
return -EBADF;
|
|
|
}
|
|
|
if (*offp == vol->used_bytes || count == 0)
|
|
@@ -300,7 +300,7 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf,
|
|
|
|
|
|
lnum = div_u64_rem(*offp, vol->usable_leb_size, &off);
|
|
|
if (off & (ubi->min_io_size - 1)) {
|
|
|
- dbg_err("unaligned position");
|
|
|
+ ubi_err("unaligned position");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -309,7 +309,7 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf,
|
|
|
|
|
|
/* We can write only in fractions of the minimum I/O unit */
|
|
|
if (count & (ubi->min_io_size - 1)) {
|
|
|
- dbg_err("unaligned write length");
|
|
|
+ ubi_err("unaligned write length");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -643,7 +643,7 @@ static int verify_mkvol_req(const struct ubi_device *ubi,
|
|
|
return 0;
|
|
|
|
|
|
bad:
|
|
|
- dbg_err("bad volume creation request");
|
|
|
+ ubi_err("bad volume creation request");
|
|
|
ubi_dump_mkvol_req(req);
|
|
|
return err;
|
|
|
}
|
|
@@ -709,12 +709,12 @@ static int rename_volumes(struct ubi_device *ubi,
|
|
|
for (i = 0; i < req->count - 1; i++) {
|
|
|
for (n = i + 1; n < req->count; n++) {
|
|
|
if (req->ents[i].vol_id == req->ents[n].vol_id) {
|
|
|
- dbg_err("duplicated volume id %d",
|
|
|
+ ubi_err("duplicated volume id %d",
|
|
|
req->ents[i].vol_id);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
if (!strcmp(req->ents[i].name, req->ents[n].name)) {
|
|
|
- dbg_err("duplicated volume name \"%s\"",
|
|
|
+ ubi_err("duplicated volume name \"%s\"",
|
|
|
req->ents[i].name);
|
|
|
return -EINVAL;
|
|
|
}
|
|
@@ -737,7 +737,7 @@ static int rename_volumes(struct ubi_device *ubi,
|
|
|
re->desc = ubi_open_volume(ubi->ubi_num, vol_id, UBI_EXCLUSIVE);
|
|
|
if (IS_ERR(re->desc)) {
|
|
|
err = PTR_ERR(re->desc);
|
|
|
- dbg_err("cannot open volume %d, error %d", vol_id, err);
|
|
|
+ ubi_err("cannot open volume %d, error %d", vol_id, err);
|
|
|
kfree(re);
|
|
|
goto out_free;
|
|
|
}
|
|
@@ -796,7 +796,7 @@ static int rename_volumes(struct ubi_device *ubi,
|
|
|
continue;
|
|
|
|
|
|
/* The volume exists but busy, or an error occurred */
|
|
|
- dbg_err("cannot open volume \"%s\", error %d",
|
|
|
+ ubi_err("cannot open volume \"%s\", error %d",
|
|
|
re->new_name, err);
|
|
|
goto out_free;
|
|
|
}
|