~ubuntu-branches/ubuntu/saucy/gparted/saucy

« back to all changes in this revision

Viewing changes to include/SWRaid.h

  • Committer: Package Import Robot
  • Author(s): Phillip Susi
  • Date: 2012-11-29 13:55:11 UTC
  • Revision ID: package-import@ubuntu.com-20121129135511-1q9x7pr6p1yso4gi
Tags: 0.12.1-2
debian/patches/drop-swraid.patch: Upstream patch to remove broken and
uneeded swraid support that was causing errors with mdadm devices
(LP: #1074606) (Closes: #697872).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2009 Curtis Gedak
2
 
 *
3
 
 *  This program is free software; you can redistribute it and/or modify
4
 
 *  it under the terms of the GNU General Public License as published by
5
 
 *  the Free Software Foundation; either version 2 of the License, or
6
 
 *  (at your option) any later version.
7
 
 *
8
 
 *  This program is distributed in the hope that it will be useful,
9
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 *  GNU Library General Public License for more details.
12
 
 *
13
 
 *  You should have received a copy of the GNU General Public License
14
 
 *  along with this program; if not, write to the Free Software
15
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
 
 */
17
 
 
18
 
/* READ THIS!
19
 
 * This class was created in an effort to reduce the complexity of the
20
 
 * GParted_Core class.
21
 
 * This class provides support for Linux software RAID devices (mdadm).
22
 
 * Static elements are used in order to reduce the disk accesses required to
23
 
 * load the data structures upon each initialization of the class.
24
 
 */
25
 
 
26
 
#ifndef SWRAID_H_
27
 
#define SWRAID_H_
28
 
 
29
 
#include "../include/Utils.h"
30
 
 
31
 
#include <vector>
32
 
 
33
 
namespace GParted
34
 
{
35
 
 
36
 
 
37
 
class SWRaid
38
 
{
39
 
public:
40
 
        SWRaid() ;
41
 
        SWRaid( const bool & do_refresh ) ;
42
 
        ~SWRaid() ;
43
 
        bool is_swraid_supported() ;
44
 
        void get_devices( std::vector<Glib::ustring> & swraid_devices ) ;
45
 
private:
46
 
        void load_swraid_cache() ;
47
 
        void set_commands_found() ;
48
 
        static bool swraid_cache_initialized ;
49
 
        static bool mdadm_found ;
50
 
        static std::vector<Glib::ustring> swraid_devices ;
51
 
};
52
 
 
53
 
}//GParted
54
 
 
55
 
#endif /* SWRAID_H_ */