lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2plf0ey9h.fsf@gmail.com>
Date: Thu, 19 Jun 2025 13:01:14 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,  Jonathan Corbet
 <corbet@....net>,  "Akira Yokosawa" <akiyks@...il.com>,  "Breno Leitao"
 <leitao@...ian.org>,  "David S. Miller" <davem@...emloft.net>,  "Eric
 Dumazet" <edumazet@...gle.com>,  "Ignacio Encinas Rubio"
 <ignacio@...cinas.com>,  "Jan Stancek" <jstancek@...hat.com>,  "Marco
 Elver" <elver@...gle.com>,  "Paolo Abeni" <pabeni@...hat.com>,  "Ruben
 Wauters" <rubenru09@....com>,  "Shuah Khan" <skhan@...uxfoundation.org>,
  joel@...lfernandes.org,  linux-kernel-mentees@...ts.linux.dev,
  linux-kernel@...r.kernel.org,  lkmm@...ts.linux.dev,
  netdev@...r.kernel.org,  peterz@...radead.org,  stern@...land.harvard.edu
Subject: Re: [PATCH v7 04/17] tools: ynl_gen_rst.py: Split library from
 command line tool

Mauro Carvalho Chehab <mchehab+huawei@...nel.org> writes:
> +
> +    def generate_main_index_rst(self, output: str, index_dir: str) -> None:
> +        """Generate the `networking_spec/index` content and write to the file"""
> +        lines = []
> +
> +        lines.append(self.fmt.rst_header())
> +        lines.append(self.fmt.rst_label("specs"))
> +        lines.append(self.fmt.rst_title("Netlink Family Specifications"))
> +        lines.append(self.fmt.rst_toctree(1))
> +
> +        index_fname = os.path.basename(output)
> +        base, ext = os.path.splitext(index_fname)
> +
> +        if not index_dir:
> +            index_dir = os.path.dirname(output)
> +
> +        logging.debug(f"Looking for {ext} files in %s", index_dir)
> +        for filename in sorted(os.listdir(index_dir)):
> +            if not filename.endswith(ext) or filename == index_fname:
> +                continue
> +            base, ext = os.path.splitext(filename)
> +            lines.append(f"   {base}\n")
> +
> +        logging.debug("Writing an index file at %s", output)
> +
> +        return "".join(lines)

Did you miss my comment on v5 to not move this from ynl_gen_rst.py,
since it is not needed and gets removed in a later patch.

> @@ -411,7 +65,6 @@ def write_to_rstfile(content: str, filename: str) -> None:
>  
>  def generate_main_index_rst(output: str) -> None:
>      """Generate the `networking_spec/index` content and write to the file"""
> -    lines = []
>  
>      lines.append(rst_header())
>      lines.append(rst_label("specs"))
> @@ -426,7 +79,7 @@ def generate_main_index_rst(output: str) -> None:
>          lines.append(f"   {filename.replace('.rst', '')}\n")
>  
>      logging.debug("Writing an index file at %s", output)
> -    write_to_rstfile("".join(lines), output)
> +    write_to_rstfile(msg, output)

The changes leave this function broken. Bot lines and msg never get
defined.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ