just wondering about write_leb() in ubi/upd.c

Monte Copeland catboatmonte at gmail.com
Mon Sep 29 14:35:42 EDT 2008


Hi,

I just fixed a bug in our older UBI version and decided to check the
upstream.  Looking at the latest from kernel.org,
I see in the write_leb() function in ubi/upd.c:

        if (vol->vol_type == UBI_DYNAMIC_VOLUME) {
                len = ALIGN(len, ubi->min_io_size);
                memset(buf + len, 0xFF, len - len);   <---- memset zero bytes?

                len = ubi_calc_data_len(ubi, buf, len);
                if (len == 0) {
                        dbg_msg("all %d bytes contain 0xFF - skip", len);
                        return 0;
                }

                err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len,
UBI_UNKNOWN);
        } else {


Monte



More information about the linux-mtd mailing list