def match_fs(disk, dev_path, fs_type, fs_makeopt):
 if (disk['fs_type'] != fs_type):
  return False
 elif (disk['fs_mkfs'] == fs_makeopt):
  return True
 elif fsinfo.match_mkfs_option(fs_type, dev_path, fs_makeopt):
  if (disk['fs_mkfs'] != '?'):
   raise Exception("mkfs option strings differ but auto-detection code thinks they're identical")
  else:
   return True
 else:
  return False

def match_fs ( disk , dev_path , fs_type , fs_makeopt ) : if ( disk [ 'fs_type' ] != fs_type ) : return False elif ( disk [ 'fs_mkfs' ] == fs_makeopt ) : return True elif fsinfo . match_mkfs_option ( fs_type , dev_path , fs_makeopt ) : if ( disk [ 'fs_mkfs' ] != '?' ) : raise Exception ( "mkfs option strings differ but auto-detection code thinks they're identical" ) else : return True else : return False
matches the user provided fs_type and fs_makeopt with the current disk .