source: MondoRescue/branches/3.2/MondoRescue/bin/mr-disk-list@ 3553

Last change on this file since 3553 was 3553, checked in by Bruno Cornec, 8 years ago

Help Fix #790

  • Fix perl functions to handle disk type (MBR vs GPT) on RHEL7 and unify output format
  • Adds perl function to list all disks on the system
  • Adds perl program to unit test these functions
  • which_partition_format now uses mr-disk-type
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/usr/bin/perl -w
2#
3# $Id$
4# Copyright B. Cornec 2005-2016
5# Provided under the GPL v2
6#
7# Test mr_disk_list to get the list of all disks
8#
9use strict;
10use Data::Dumper;
11# For pbdebug
12use ProjectBuilder::Base;
13use MondoRescue::Disk;
14
15=pod
16
17=head1 NAME
18
19mr-disk-list lists all the disks on the system
20
21=head1 DESCRIPTION
22
23mr-disk-list lists all the disks on the system
24
25=head1 SYNOPSIS
26
27mr-disk-list
28
29=head1 WEB SITES
30
31The main Web site of the project is available at L<http://www.mondorescue.org>. Bug reports should be filled using the trac instance of the project at L<http://trac.mondorescue.org/>.
32
33=head1 USER MAILING LIST
34
35For community exchanges around MondoRescue please use the list L<http://sourceforge.net/mailarchive/forum.php?forum_name=mondo-devel>
36
37=head1 AUTHORS
38
39The MondoRescue team lead by Bruno Cornec L<mailto:bruno@mondorescue.org>.
40
41=head1 COPYRIGHT
42
43MondoRescue is distributed under the GPL v2.0 license or later,
44described in the file C<COPYING> included with the distribution.
45
46=cut
47
48if ((defined $ARGV[0]) && ($ARGV[0] eq "-v")) {
49 shift;
50 $pbdebug = 2;
51}
52
53my $txt = "";
54my $txt2 = "";
55my @ans;
56
57@ans = mr_disk_list();
58pb_log(0, "The list of disks on this system are: @ans\n");
59
60exit(0);
Note: See TracBrowser for help on using the repository browser.