whitespace and namespace cleanups
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Apr 2016 20:24:51 +0000 (22:24 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Apr 2016 20:24:51 +0000 (22:24 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/ubi.c
miscutils/ubi_tools.c
miscutils/ubirename.c

index 35c28df51ace6a4803fc46e55ac4b998fd96e929..111dd66e0dd5186307e01fc1f653b3fd26c82061 100644 (file)
@@ -1771,7 +1771,7 @@ void bb_progress_update(bb_progress_t *p,
                        uoff_t totalsize) FAST_FUNC;
 
 unsigned ubi_devnum_from_devname(const char *str) FAST_FUNC;
-int get_volid_by_name(unsigned ubi_devnum, const char *vol_name) FAST_FUNC;
+int ubi_get_volid_by_name(unsigned ubi_devnum, const char *vol_name) FAST_FUNC;
 
 
 extern const char *applet_name;
index 7d3b2952d082a67b0f6ca212129c47c2fd599ff8..34595d79790c409d21c8714658760e83c522f15b 100644 (file)
 
 unsigned FAST_FUNC ubi_devnum_from_devname(const char *str)
 {
-        unsigned ubi_devnum;
+       unsigned ubi_devnum;
 
-        if (sscanf(str, "/dev/ubi%u", &ubi_devnum) != 1)
-                bb_error_msg_and_die("not an UBI device: '%s'", str);
+       if (sscanf(str, "/dev/ubi%u", &ubi_devnum) != 1)
+               bb_error_msg_and_die("not an UBI device: '%s'", str);
        return ubi_devnum;
 }
 
-int FAST_FUNC get_volid_by_name(unsigned ubi_devnum, const char *vol_name)
+int FAST_FUNC ubi_get_volid_by_name(unsigned ubi_devnum, const char *vol_name)
 {
        unsigned i;
 
index ac0c56d6bae6bcfcd5b8a33d57f71d412c0d11ed..4364bc807f5ee5b3dd2038044b841a07a7477550 100644 (file)
@@ -257,7 +257,7 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv)
 
                if (opts & OPTION_N) {
                        unsigned num = ubi_devnum_from_devname(ubi_ctrl);
-                       vol_id = get_volid_by_name(num, vol_name);
+                       vol_id = ubi_get_volid_by_name(num, vol_name);
                }
 
                if (sizeof(vol_id) != 4) {
index d6ccfcb10996a432ae39b6baccd0470701413388..8b1c3785ac6425945771e408f844ca7bf2c5ec80 100644 (file)
@@ -31,7 +31,7 @@
 
 // from ubi-media.h
 #define UBI_MAX_VOLUME_NAME 127
-#define UBI_MAX_VOLUMES  128
+#define UBI_MAX_VOLUMES     128
 // end ubi-media.h
 
 // from ubi-user.h
@@ -79,7 +79,7 @@ int ubirename_main(int argc, char **argv)
        n = 0;
        argv += 2;
        while (argv[0]) {
-               rnvol->ents[n].vol_id = get_volid_by_name(ubi_devnum, argv[0]);
+               rnvol->ents[n].vol_id = ubi_get_volid_by_name(ubi_devnum, argv[0]);
                rnvol->ents[n].name_len = strlen(argv[1]);
                if (rnvol->ents[n].name_len >= sizeof(rnvol->ents[n].name))
                        bb_error_msg_and_die("new name '%s' is too long", argv[1]);