summaryrefslogtreecommitdiff
path: root/lib/libubi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libubi.c')
-rw-r--r--lib/libubi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/libubi.c b/lib/libubi.c
index dcf6337..b50e68a 100644
--- a/lib/libubi.c
+++ b/lib/libubi.c
@@ -835,8 +835,7 @@ int ubi_detach(libubi_t desc, const char *node, const char *mtd_dev_node)
int ubi_remove_dev(libubi_t desc, const char *node, int ubi_dev)
{
int fd, ret;
-
- desc = desc;
+ (void)desc;
fd = open(node, O_RDONLY);
if (fd == -1)
@@ -993,10 +992,10 @@ int ubi_mkvol(libubi_t desc, const char *node, struct ubi_mkvol_request *req)
int fd, ret;
struct ubi_mkvol_req r;
size_t n;
+ (void)desc;
memset(&r, 0, sizeof(struct ubi_mkvol_req));
- desc = desc;
r.vol_id = req->vol_id;
r.alignment = req->alignment;
r.bytes = req->bytes;
@@ -1009,7 +1008,6 @@ int ubi_mkvol(libubi_t desc, const char *node, struct ubi_mkvol_request *req)
strncpy(r.name, req->name, UBI_MAX_VOLUME_NAME + 1);
r.name_len = n;
- desc = desc;
fd = open(node, O_RDONLY);
if (fd == -1)
return sys_errmsg("cannot open \"%s\"", node);
@@ -1029,8 +1027,8 @@ int ubi_mkvol(libubi_t desc, const char *node, struct ubi_mkvol_request *req)
int ubi_rmvol(libubi_t desc, const char *node, int vol_id)
{
int fd, ret;
+ (void)desc;
- desc = desc;
fd = open(node, O_RDONLY);
if (fd == -1)
return sys_errmsg("cannot open \"%s\"", node);
@@ -1049,8 +1047,8 @@ int ubi_rmvol(libubi_t desc, const char *node, int vol_id)
int ubi_rnvols(libubi_t desc, const char *node, struct ubi_rnvol_req *rnvol)
{
int fd, ret;
+ (void)desc;
- desc = desc;
fd = open(node, O_RDONLY);
if (fd == -1)
return -1;
@@ -1070,8 +1068,8 @@ int ubi_rsvol(libubi_t desc, const char *node, int vol_id, long long bytes)
{
int fd, ret;
struct ubi_rsvol_req req;
+ (void)desc;
- desc = desc;
fd = open(node, O_RDONLY);
if (fd == -1)
return sys_errmsg("cannot open \"%s\"", node);
@@ -1096,7 +1094,7 @@ int ubi_vol_block_remove(int fd)
int ubi_update_start(libubi_t desc, int fd, long long bytes)
{
- desc = desc;
+ (void)desc;
if (ioctl(fd, UBI_IOCVOLUP, &bytes))
return -1;
return 0;
@@ -1105,8 +1103,8 @@ int ubi_update_start(libubi_t desc, int fd, long long bytes)
int ubi_leb_change_start(libubi_t desc, int fd, int lnum, int bytes)
{
struct ubi_leb_change_req req;
+ (void)desc;
- desc = desc;
memset(&req, 0, sizeof(struct ubi_leb_change_req));
req.lnum = lnum;
req.bytes = bytes;