summaryrefslogtreecommitdiffstats
path: root/rescue/lsparts
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-07-11 06:21:35 +0000
committerMystery Man <unknown@mandriva.org>2005-07-11 06:21:35 +0000
commite7e8874c1e8a190504398f630cd64d8915ca91fd (patch)
treefc8d33e7b3132cc1fb9082d1dec76aee45c7a7c3 /rescue/lsparts
parentec1a5b3ef5968d94ead5db08b5e67a0a3c3badaf (diff)
downloaddrakx-e7e8874c1e8a190504398f630cd64d8915ca91fd.tar
drakx-e7e8874c1e8a190504398f630cd64d8915ca91fd.tar.gz
drakx-e7e8874c1e8a190504398f630cd64d8915ca91fd.tar.bz2
drakx-e7e8874c1e8a190504398f630cd64d8915ca91fd.tar.xz
drakx-e7e8874c1e8a190504398f630cd64d8915ca91fd.zip
This commit was manufactured by cvs2svn to create tagV10_3_0_34mdk
'V10_3_0_34mdk'.
Diffstat (limited to 'rescue/lsparts')
-rwxr-xr-xrescue/lsparts45
1 files changed, 0 insertions, 45 deletions
diff --git a/rescue/lsparts b/rescue/lsparts
deleted file mode 100755
index 9f0fac925..000000000
--- a/rescue/lsparts
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl
-#
-# Main author Pascal Rigaux (pixel@mandriva.com)
-# Put together by Guillaume Cottenceau
-#
-# Copyright 1999-2005 Mandriva
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-#
-# Detects partition types using signatures
-#
-
-use lib qw(../perl-install /usr/lib/libDrakX);
-use common;
-use fs::type;
-use fs::proc_partitions;
-
-my $params = join '', @ARGV;
-my $verbose = $params =~ /-v/;
-
-$params =~ /-h/ and die "usage: lsparts [-v]\n";
-
-
-foreach (fs::proc_partitions::read_raw()) {
- if (my $err = $_->{size} <= 1 ?
- "Skipping <$_->{dev}> because too little blocks ($_->{size})" :
- $_->{dev} !~ /\d$/ ?
- "Skipping <$_->{dev}> because doesn't end with a number (e.g. seems to not be a partition)" :
- $_->{dev} =~ /^loop\d+$/ ?
- "Skipping <$_->{dev}>" :
- '') {
- print STDERR "$err\n" if $verbose;
- } else {
- $_->{device} = $_->{dev};
- if (my $type = fs::type::type_subpart_from_magic($_)) {
- printf "$_->{dev}: %6s, fs %s (%s)\n", formatXiB($_->{size} * 512), $type->{fs_type}, fs::type::part2type_name($type);
- }
- }
-}