Lines Matching refs:filename

867     def __init__(self, filename="Kconfig", warn=True, warn_to_stderr=True,  argument
947 self._init(filename, warn, warn_to_stderr, encoding)
959 def _init(self, filename, warn, warn_to_stderr, encoding): argument
1054 self.top_node.filename = filename
1061 self.kconfig_filenames = [filename]
1070 self.filename = filename
1080 self._readline = self._open(join(self.srctree, filename), "r").readline
1089 _decoding_error(e, self.filename)
1139 for filename, cond in self.defconfig_list.defaults:
1142 with self._open_config(filename.str_value) as f:
1149 def load_config(self, filename=None, replace=True, verbose=None): argument
1216 if filename is None:
1217 filename = standard_config_filename()
1218 if not exists(filename) and \
1219 not exists(join(self.srctree, filename)):
1223 .format(filename)
1226 .format(defconfig, filename)
1227 filename = defconfig
1230 msg = " configuration '{}'".format(filename)
1239 self._load_config(filename, replace)
1241 _decoding_error(e, filename)
1247 def _load_config(self, filename, replace): argument
1248 with self._open_config(filename) as f:
1278 self._undef_assign(name, val, filename, linenr)
1292 filename, linenr)
1308 filename, linenr)
1319 filename, linenr)
1334 filename, linenr)
1341 self._undef_assign(name, "n", filename, linenr)
1352 self._assigned_twice(sym, val, filename, linenr)
1368 def _undef_assign(self, name, val, filename, linenr): argument
1375 .format(val, name), filename, linenr)
1377 def _assigned_twice(self, sym, new_val, filename, linenr): argument
1391 self._warn(msg, filename, linenr)
1393 self._warn(msg, filename, linenr)
1395 def load_allconfig(self, filename): argument
1415 load_allconfig(self, filename)
1417 def write_autoconf(self, filename=None, header=None): argument
1452 if filename is None:
1453 filename = os.getenv("KCONFIG_AUTOHEADER",
1456 if self._write_if_changed(filename, self._autoconf_contents(header)):
1457 return "Kconfig header saved to '{}'".format(filename)
1458 return "No change to Kconfig header in '{}'".format(filename)
1503 def write_config(self, filename=None, header=None, save_old=True, argument
1568 if filename is None:
1569 filename = standard_config_filename()
1572 if self._contents_eq(filename, contents):
1573 return "No change to configuration in '{}'".format(filename)
1576 _save_old(filename)
1578 with self._open(filename, "w") as f:
1581 return "Configuration saved to '{}'".format(filename)
1658 def write_min_config(self, filename, header=None): argument
1691 if self._write_if_changed(filename, self._min_config_contents(header)):
1692 return "Minimal configuration saved to '{}'".format(filename)
1693 return "No change to minimal configuration in '{}'".format(filename)
1981 self.filename = None
2111 def _open_config(self, filename): argument
2117 return self._open(filename, "r")
2122 return self._open(join(self.srctree, filename), "r")
2133 .format(filename, errno.errorcode[e.errno], e.strerror,
2137 def _enter_file(self, filename): argument
2147 if filename.startswith(self._srctree_prefix):
2150 rel_filename = filename[len(self._srctree_prefix):]
2153 rel_filename = filename
2175 self._include_path += ((self.filename, self.linenr),)
2184 .format(self.filename, self.linenr, rel_filename,
2189 self._readline = self._open(filename, "r").readline
2194 .format(self.filename, self.linenr, filename,
2198 self.filename = rel_filename
2206 self.filename, self.linenr = self._include_path[-1]
2260 def _write_if_changed(self, filename, contents): argument
2273 if self._contents_eq(filename, contents):
2275 with self._open(filename, "w") as f:
2279 def _contents_eq(self, filename, contents): argument
2284 with self._open(filename, "r") as f:
2428 self.filename, self.linenr)
2847 .format(self.filename, self.linenr, fn,
2935 node.filename = self.filename
2964 pattern = join(dirname(self.filename), pattern)
2982 .format(self.filename, self.linenr, pattern,
2987 for filename in filenames:
2988 self._enter_file(filename)
3021 node.filename = self.filename
3041 node.filename = self.filename
3073 node.filename = self.filename
3105 self.filename))
3217 self.filename, self.linenr)
3227 self.filename, self.linenr)
3237 self.filename, self.linenr)
3254 self.filename, self.linenr)
3880 "" if self.filename is None else
3881 "{}:{}: ".format(self.filename, self.linenr),
3887 def _open(self, filename, mode): argument
3921 return open(filename, "rU" if mode == "r" else mode) if _IS_PY2 else \
3922 open(filename, mode, encoding=self._encoding)
3966 .format(node.filename, node.linenr, node)
3969 def _warn(self, msg, filename=None, linenr=None): argument
3976 if filename is not None:
3977 msg = "{}:{}: {}".format(filename, linenr, msg)
4738 add("{}:{}".format(node.filename, node.linenr))
5344 add("{}:{}".format(node.filename, node.linenr))
5761 add("{}:{}".format(self.filename, self.linenr))
5977 ioerror.errno, ioerror.strerror, ioerror.filename)
6236 def load_allconfig(kconf, filename): argument
6253 return IOError(e.errno, e.strerror, e.filename)
6261 print(kconf.load_config(filename, False))
6268 .format(filename, std_msg(e1), std_msg(e2)))
6717 def _decoding_error(e, filename, macro_linenr=None): argument
6732 "'{}'".format(filename) if macro_linenr is None else
6733 "output from macro at {}:{}".format(filename, macro_linenr),
6753 return kconf.filename
6761 print("{}:{}: {}".format(kconf.filename, kconf.linenr, msg))
6768 kconf._warn(msg, kconf.filename, kconf.linenr)
6776 kconf.filename, kconf.linenr, msg))
6793 _decoding_error(e, kconf.filename, kconf.linenr)
6798 kconf.filename, kconf.linenr)