def mappings_prepend_dev(mappings):
 for m in mappings:
  virtual = m['virtual']
  if (is_swap_or_ephemeral(virtual) and (not m['device'].startswith('/'))):
   m['device'] = ('/dev/' + m['device'])
 return mappings

def mappings_prepend_dev ( mappings ) : for m in mappings : virtual = m [ 'virtual' ] if ( is_swap_or_ephemeral ( virtual ) and ( not m [ 'device' ] . startswith ( '/' ) ) ) : m [ 'device' ] = ( '/dev/' + m [ 'device' ] ) return mappings
prepend /dev/ to device entry of swap/ephemeral virtual type .