aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-04-03 22:24:51 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-04-03 22:24:51 +0200
commit6aab9928dec29855bcee21bce163e5fdf7144350 (patch)
tree39cfa4f508f208ae093fefcd8b865a0cb36547e2
parentb068cf2a7e036da8d0b3533b41886c5605c8139d (diff)
downloadbusybox-w32-6aab9928dec29855bcee21bce163e5fdf7144350.tar.gz
busybox-w32-6aab9928dec29855bcee21bce163e5fdf7144350.tar.bz2
busybox-w32-6aab9928dec29855bcee21bce163e5fdf7144350.zip
whitespace and namespace cleanups
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/ubi.c8
-rw-r--r--miscutils/ubi_tools.c2
-rw-r--r--miscutils/ubirename.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 35c28df51..111dd66e0 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1771,7 +1771,7 @@ void bb_progress_update(bb_progress_t *p,
1771 uoff_t totalsize) FAST_FUNC; 1771 uoff_t totalsize) FAST_FUNC;
1772 1772
1773unsigned ubi_devnum_from_devname(const char *str) FAST_FUNC; 1773unsigned ubi_devnum_from_devname(const char *str) FAST_FUNC;
1774int get_volid_by_name(unsigned ubi_devnum, const char *vol_name) FAST_FUNC; 1774int ubi_get_volid_by_name(unsigned ubi_devnum, const char *vol_name) FAST_FUNC;
1775 1775
1776 1776
1777extern const char *applet_name; 1777extern const char *applet_name;
diff --git a/libbb/ubi.c b/libbb/ubi.c
index 7d3b2952d..34595d797 100644
--- a/libbb/ubi.c
+++ b/libbb/ubi.c
@@ -16,14 +16,14 @@
16 16
17unsigned FAST_FUNC ubi_devnum_from_devname(const char *str) 17unsigned FAST_FUNC ubi_devnum_from_devname(const char *str)
18{ 18{
19 unsigned ubi_devnum; 19 unsigned ubi_devnum;
20 20
21 if (sscanf(str, "/dev/ubi%u", &ubi_devnum) != 1) 21 if (sscanf(str, "/dev/ubi%u", &ubi_devnum) != 1)
22 bb_error_msg_and_die("not an UBI device: '%s'", str); 22 bb_error_msg_and_die("not an UBI device: '%s'", str);
23 return ubi_devnum; 23 return ubi_devnum;
24} 24}
25 25
26int FAST_FUNC get_volid_by_name(unsigned ubi_devnum, const char *vol_name) 26int FAST_FUNC ubi_get_volid_by_name(unsigned ubi_devnum, const char *vol_name)
27{ 27{
28 unsigned i; 28 unsigned i;
29 29
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c
index ac0c56d6b..4364bc807 100644
--- a/miscutils/ubi_tools.c
+++ b/miscutils/ubi_tools.c
@@ -257,7 +257,7 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv)
257 257
258 if (opts & OPTION_N) { 258 if (opts & OPTION_N) {
259 unsigned num = ubi_devnum_from_devname(ubi_ctrl); 259 unsigned num = ubi_devnum_from_devname(ubi_ctrl);
260 vol_id = get_volid_by_name(num, vol_name); 260 vol_id = ubi_get_volid_by_name(num, vol_name);
261 } 261 }
262 262
263 if (sizeof(vol_id) != 4) { 263 if (sizeof(vol_id) != 4) {
diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c
index d6ccfcb10..8b1c3785a 100644
--- a/miscutils/ubirename.c
+++ b/miscutils/ubirename.c
@@ -31,7 +31,7 @@
31 31
32// from ubi-media.h 32// from ubi-media.h
33#define UBI_MAX_VOLUME_NAME 127 33#define UBI_MAX_VOLUME_NAME 127
34#define UBI_MAX_VOLUMES 128 34#define UBI_MAX_VOLUMES 128
35// end ubi-media.h 35// end ubi-media.h
36 36
37// from ubi-user.h 37// from ubi-user.h
@@ -79,7 +79,7 @@ int ubirename_main(int argc, char **argv)
79 n = 0; 79 n = 0;
80 argv += 2; 80 argv += 2;
81 while (argv[0]) { 81 while (argv[0]) {
82 rnvol->ents[n].vol_id = get_volid_by_name(ubi_devnum, argv[0]); 82 rnvol->ents[n].vol_id = ubi_get_volid_by_name(ubi_devnum, argv[0]);
83 rnvol->ents[n].name_len = strlen(argv[1]); 83 rnvol->ents[n].name_len = strlen(argv[1]);
84 if (rnvol->ents[n].name_len >= sizeof(rnvol->ents[n].name)) 84 if (rnvol->ents[n].name_len >= sizeof(rnvol->ents[n].name))
85 bb_error_msg_and_die("new name '%s' is too long", argv[1]); 85 bb_error_msg_and_die("new name '%s' is too long", argv[1]);