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;
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;
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) {
// 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
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]);