def fileinfo_remove(log_table, remove_table):
    """
    Remove files from log table that are in remove table.

    Params:
        log_table    {fileinfo} - dictionary to remove from
        remove_table {fileinfo} - dicionary containing keys to remove

    Returns:
        removed (int) - number of entries removed

    Notes:
    does not actually remove entries simply marks for deletion (see fileinfo_clean)
    """

    removed = 0

    for k in remove_table:
        if k in log_table:
            log_table[k].flags |= 0x2 # marked for removal
            removed += 1

    return removed