Beispiel #1
0
    def get_entry(self, entry):
        """
        Get a single bootloader entry information.

        @param entry: entry index
        @return a dictionary of key->value where key is the type of entry
                information (ex. 'title', 'args', 'kernel', etc) and value
                is the value for that piece of information.
        """
        output = self._run_boottool_stdout('--info=%s' % entry).strip()
        return parse_entry(output, ":")
Beispiel #2
0
    def get_entry(self, entry):
        """
        Get a single bootloader entry information.

        :param entry: entry index
        :return: a dictionary of key->value where key is the type of entry
                information (ex. 'title', 'args', 'kernel', etc) and value
                is the value for that piece of information.
        """
        output = self._run_boottool_stdout('--info=%s' % entry).strip()
        return parse_entry(output, ":")
Beispiel #3
0
    def get_entries(self):
        """
        Get all entries information.

        @return: a dictionary of index -> entry where entry is a dictionary
                of entry information as described for get_entry().
        """
        raw = "\n" + self._run_boottool_stdout('--info=all')
        entries = {}
        for entry_str in raw.split("\nindex"):
            if len(entry_str.strip()) == 0:
                continue
            entry = parse_entry("index" + entry_str, ":")
            entries[entry["index"]] = entry

        return entries
Beispiel #4
0
    def get_entries(self):
        """
        Get all entries information.

        :return: a dictionary of index -> entry where entry is a dictionary
                of entry information as described for get_entry().
        """
        raw = "\n" + self._run_boottool_stdout('--info=all')
        entries = {}
        for entry_str in raw.split("\nindex"):
            if len(entry_str.strip()) == 0:
                continue
            entry = parse_entry("index" + entry_str, ":")
            entries[entry["index"]] = entry

        return entries