From: Bernhard Bitsch <bbitsch@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCHv2 09/12] extrahd.cgi: Drop select for FS selection.
Date: Wed, 02 Aug 2023 14:09:28 +0200 [thread overview]
Message-ID: <a0a44fa1-0003-eb84-cdaf-d07fb743b4fd@ipfire.org> (raw)
In-Reply-To: <20230801154839.2373-9-stefan.schantl@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2618 bytes --]
Reviewed-by: Bernhard Bitsch <bbitsch(a)ipfire.org>
Am 01.08.2023 um 17:48 schrieb Stefan Schantl:
> This feature does not have any benefit because the linux kernel
> knows best which filesystem a device/partition has.
>
> So there is no need for a user to specify this by-hand. This also
> prevents from choosing a wrong fs type and as a direct result in a
> not mountable device.
>
> Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
> ---
> html/cgi-bin/extrahd.cgi | 35 +++++------------------------------
> 1 file changed, 5 insertions(+), 30 deletions(-)
>
> diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi
> index 0b59a02f7..c621bd72f 100644
> --- a/html/cgi-bin/extrahd.cgi
> +++ b/html/cgi-bin/extrahd.cgi
> @@ -45,16 +45,6 @@ my @valid_mount_dirs = (
> "/mnt",
> );
>
> -# Array which contains the supported file systems.
> -my @supported_filesystems = (
> - "auto",
> - "ext3",
> - "ext4",
> - "xfs",
> - "vfat",
> - "ntfs-3g"
> -);
> -
> # Grab all available block devices.
> my @devices = &get_block_devices();
>
> @@ -252,6 +242,9 @@ END
> # Convert into human-readable format.
> my $size = &General::formatBytes($bsize);
>
> + # Try to omit the used filesystem.
> + my $fs = $filesystems{$partition};
> +
> # Get the mountpoint.
> my $mountpoint = $mountpoints{$partition};
>
> @@ -279,11 +272,9 @@ END
> } elsif (&is_swap($partition)) {
> $disabled = "disabled";
> $mountpoint = "swap";
> + $fs = "swap";
> }
>
> - # Omit the used filesystem.
> - my $fs = $filesystems{$partition};
> -
> print <<END
>
> <form method='post' action='$ENV{'SCRIPT_NAME'}'>
> @@ -291,23 +282,7 @@ END
> <tr>
> <td align="list">/dev/$partition</td>
> <td align="center">$Lang::tr{'size'} $size</td>
> - <td align="center"><select name="FS" $disabled>
> -END
> -;
> - # Loop through the array of supported filesystems.
> - foreach my $filesystem (@supported_filesystems) {
> - my $selected;
> -
> - # Mark the used filesystem as selected.
> - if ($filesystem eq $fs) {
> - $selected = "selected";
> - }
> -
> - print "<option value='$filesystem' $selected>$filesystem</option>\n";
> - }
> -
> - print <<END
> - </select></td>
> + <td align="center">$fs</td>
> <td align="center"><input type='text' name='PATH' value='$mountpoint' $disabled></td>
> <td align="center">
> <input type='hidden' name='DEVICE' value='/dev/$partition' />
next prev parent reply other threads:[~2023-08-02 12:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 15:48 [PATCHv2 01/12] extrahd.cgi: Add various perl functions deal with block devices Stefan Schantl
2023-08-01 15:48 ` [PATCHv2 02/12] extrahd.cgi: Refactor code to use new introduced perl functions Stefan Schantl
2023-08-02 11:48 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 03/12] extrahd.cgi: Abort if a device could not be umounted Stefan Schantl
2023-08-02 11:50 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 04/12] extrahd.cgi: Store configured drives in a hash Stefan Schantl
2023-08-02 11:53 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 05/12] extrahd.cgi: Add is_configured function Stefan Schantl
2023-08-02 11:54 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 06/12] extrahd.cgi: Display mount status next to the corresponding drive Stefan Schantl
2023-08-02 11:55 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 07/12] extrahd.cgi: Re-order sanity check logic Stefan Schantl
2023-08-02 11:57 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 08/12] extrahd.cgi: Add missing translation strings Stefan Schantl
2023-08-02 12:02 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 09/12] extrahd.cgi: Drop select for FS selection Stefan Schantl
2023-08-02 12:09 ` Bernhard Bitsch [this message]
2023-08-01 15:48 ` [PATCHv2 10/12] extrahd.cgi: Requires "auto" as hidden FS type to mount a new device Stefan Schantl
2023-08-02 12:10 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 11/12] extrahd.cgi: Do not allow "/mnt" or "/media" as mount points Stefan Schantl
2023-08-02 12:11 ` Bernhard Bitsch
2023-08-01 15:48 ` [PATCHv2 12/12] extrahd.cgi: Adjust copyright header Stefan Schantl
2023-08-02 12:12 ` Bernhard Bitsch
2023-08-02 11:39 ` [PATCHv2 01/12] extrahd.cgi: Add various perl functions deal with block devices Bernhard Bitsch
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=a0a44fa1-0003-eb84-cdaf-d07fb743b4fd@ipfire.org \
--to=bbitsch@ipfire.org \
--cc=development@lists.ipfire.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox