From: Gabriel Goller <g.goller@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH proxmox-firewall 2/2] firewall: add subcommands to proxmox-firewall binary
Date: Wed, 23 Apr 2025 13:46:16 +0200 [thread overview]
Message-ID: <z6xoalxyyekii6uiq2jczyaw6lp7e34nza557qowsju2lh7i7q@v7neadpkerd7> (raw)
In-Reply-To: <20250414154455.274151-3-s.hanreich@proxmox.com>
On 14.04.2025 17:44, Stefan Hanreich wrote:
> [snip]
>+fn main() -> Result<(), Error> {
>+ let mut args = Arguments::from_env();
>+
>+ let parsed_command = args.subcommand()?
>+ .ok_or_else(|| format_err!("no subcommand specified"))?
Maybe we could print HELP here again? So that you don't have to guess
the subcommands.
>+ .parse();
>+
>+ if let Ok(command) = parsed_command {
>+ run_command(command)
>+ } else {
>+ eprintln!("Invalid command specified!\n{}", HELP);
>+ std::process::exit(1);
>+ }
>+
>+}
Also this file needs a `cargo fmt` :)
Otherwise the whole series looks good, consider:
Reviewed-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-04-23 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 15:44 [pve-devel] [PATCH docs/proxmox-firewall 0/3] migrate proxmox-firewall to proxmox-log + introduce subcommands Stefan Hanreich
2025-04-14 15:44 ` [pve-devel] [PATCH proxmox-firewall 1/2] firewall: use proxmox_log Stefan Hanreich
2025-04-14 15:44 ` [pve-devel] [PATCH proxmox-firewall 2/2] firewall: add subcommands to proxmox-firewall binary Stefan Hanreich
2025-04-23 11:46 ` Gabriel Goller [this message]
2025-04-14 15:44 ` [pve-devel] [PATCH pve-docs 1/1] firewall: update 'useful commands' section with new subcommands Stefan Hanreich
2025-05-27 13:59 ` [pve-devel] superseded: [PATCH docs/proxmox-firewall 0/3] migrate proxmox-firewall to proxmox-log + introduce subcommands Stefan Hanreich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=z6xoalxyyekii6uiq2jczyaw6lp7e34nza557qowsju2lh7i7q@v7neadpkerd7 \
--to=g.goller@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.hanreich@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal