aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-18 14:29:46 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-18 15:28:03 +0300
commitce373edc993bf43a554f73c059a4fd8fa54797cf (patch)
tree700143ff6187abff448862df0a9dde71ce7acd99 /ubi-utils/src
parent39bde7ee31ed2e26f2984a04a432e9784daaf823 (diff)
libubi: remove useless variable
We know that sysfs is always at /sys, so we do not have to store it in lib->sysfs. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src')
-rw-r--r--ubi-utils/src/libubi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ubi-utils/src/libubi.c b/ubi-utils/src/libubi.c
index 6f07039..a434b0d 100644
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/src/libubi.c
@@ -516,11 +516,7 @@ libubi_t libubi_open(int required)
if (!lib)
return NULL;
- lib->sysfs = strdup("/sys");
- if (!lib->sysfs)
- goto out_error;
-
- lib->sysfs_ctrl = mkpath(lib->sysfs, SYSFS_CTRL);
+ lib->sysfs_ctrl = mkpath("/sys", SYSFS_CTRL);
if (!lib->sysfs_ctrl)
goto out_error;
@@ -528,7 +524,7 @@ libubi_t libubi_open(int required)
if (!lib->ctrl_dev)
goto out_error;
- lib->sysfs_ubi = mkpath(lib->sysfs, SYSFS_UBI);
+ lib->sysfs_ubi = mkpath("/sys", SYSFS_UBI);
if (!lib->sysfs_ubi)
goto out_error;
@@ -673,7 +669,6 @@ void libubi_close(libubi_t desc)
free(lib->sysfs_ubi);
free(lib->ctrl_dev);
free(lib->sysfs_ctrl);
- free(lib->sysfs);
free(lib);
}