mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-10-30 08:17:24 +00:00
Enabled type checking (const instead of #define)
svn path=/trunk/; revision=1080
This commit is contained in:
parent
14363d96f4
commit
f259327c82
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2009-02-27 Curtis Gedak <gedakc@gmail.com>
|
||||||
|
|
||||||
|
* src/GParted_Core.cc: Enabled type checking (const instead of #define)
|
||||||
|
|
||||||
2009-02-25 Curtis Gedak <gedakc@gmail.com>
|
2009-02-25 Curtis Gedak <gedakc@gmail.com>
|
||||||
|
|
||||||
* src/GParted_Core.cc: Added recognition of /dev/mmcblk* SD/MMC devices.
|
* src/GParted_Core.cc: Added recognition of /dev/mmcblk* SD/MMC devices.
|
||||||
|
|
|
@ -848,9 +848,9 @@ GParted::FILESYSTEM GParted_Core::get_filesystem()
|
||||||
}
|
}
|
||||||
|
|
||||||
//btrfs
|
//btrfs
|
||||||
#define BTRFS_SUPER_INFO_SIZE 4096
|
const Sector BTRFS_SUPER_INFO_SIZE = 4096 ;
|
||||||
#define BTRFS_SUPER_INFO_OFFSET (64 * 1024)
|
const Sector BTRFS_SUPER_INFO_OFFSET = (64 * 1024) ;
|
||||||
#define BTRFS_SIGNATURE "_BHRfS_M"
|
const Glib::ustring BTRFS_SIGNATURE = "_BHRfS_M" ;
|
||||||
|
|
||||||
char buf_btrfs[BTRFS_SUPER_INFO_SIZE] ;
|
char buf_btrfs[BTRFS_SUPER_INFO_SIZE] ;
|
||||||
|
|
||||||
|
@ -859,10 +859,10 @@ GParted::FILESYSTEM GParted_Core::get_filesystem()
|
||||||
(BTRFS_SUPER_INFO_OFFSET / 512), \
|
(BTRFS_SUPER_INFO_OFFSET / 512), \
|
||||||
(BTRFS_SUPER_INFO_SIZE / 512)
|
(BTRFS_SUPER_INFO_SIZE / 512)
|
||||||
) ;
|
) ;
|
||||||
strncpy(magic, buf_btrfs+64, strlen(BTRFS_SIGNATURE)) ; magic[strlen(BTRFS_SIGNATURE)] = '\0' ; //set and terminate string
|
strncpy(magic, buf_btrfs+64, BTRFS_SIGNATURE .size()) ; magic[BTRFS_SIGNATURE .size()] = '\0' ; //set and terminate string
|
||||||
ped_device_close( lp_device ) ;
|
ped_device_close( lp_device ) ;
|
||||||
|
|
||||||
if ( magic == Glib::ustring(BTRFS_SIGNATURE) )
|
if ( magic == BTRFS_SIGNATURE )
|
||||||
{
|
{
|
||||||
temp = _( "BTRFS is not yet supported." ) ;
|
temp = _( "BTRFS is not yet supported." ) ;
|
||||||
temp += "\n" ;
|
temp += "\n" ;
|
||||||
|
|
Loading…
Reference in a new issue