<commit_before>import uos
from flashbdev import bdev

def check_bootsec():
    buf = bytearray(bdev.SEC_SIZE)
    bdev.readblocks(0, buf)
    empty = True
    for b in buf:
        if b != 0xff:
            empty = False
            break
    if empty:<commit_msg>esp32/modules/inisetup.py: Use bdev.ioctl instead of bdev.SEC_SIZE.<commit_after>import uos
from flashbdev import bdev

def check_bootsec():
    buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
    bdev.readblocks(0, buf)
    empty = True
    for b in buf:
        if b != 0xff:
            empty = False
            break
    if empty:
{'fraction_non_alphanumeric': 0.08818635607321132, 'fraction_numerical': 0.014975041597337771, 'mean_word_length': 2.254054054054054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2863237', 'n_tokens_mistral': 209, 'n_tokens_neox': 205, 'n_words': 60}