def METHOD_NAME(key, SCSIid, entry, remove, add):
    path = os.path.join(MAPPER_DIR, SCSIid)
    util.SMlog("MPATH: Updating entry for [%s], current: %s" % (SCSIid, entry))
    if os.path.exists(path):
        count, total = get_path_count(SCSIid)
        max = 0
        if len(entry) != 0:
            try:
                p = entry.strip('[')
                p = p.strip(']')
                q = p.split(',')
                max = int(q[1])
            except:
                pass
        if total > max:
            max = total
        newentry = [count, max]
        if str(newentry) != entry:
            remove('multipathed')
            remove(key)
            add('multipathed', 'true')
            add(key, str(newentry))
            util.SMlog("MPATH: Set val: %s" % str(newentry))
    else:
        util.SMlog('MPATH: device %s gone' % (SCSIid))
        remove('multipathed')
        remove(key)