UBI: improve error messages

Always print error code with error messages, sometimes it is
extremely helpful info.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
Artem Bityutskiy
2007-12-15 19:56:51 +02:00
parent 49dfc29928
commit 01f7b309e4
3 changed files with 19 additions and 8 deletions

View File

@@ -377,7 +377,8 @@ static ssize_t vol_cdev_write(struct file *file, const char __user *buf,
err = ubi_more_update_data(ubi, vol->vol_id, buf, count);
if (err < 0) {
ubi_err("cannot write %zd bytes of update data", count);
ubi_err("cannot write %zd bytes of update data, error %d",
count, err);
return err;
}