Changeset 25414

Show
Ignore:
Timestamp:
05/10/08 06:44:00 (6 days ago)
Author:
axeld
Message:
* Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
  by short/pretty/module name - since they should all be unique, I put them
  in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
  header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/headers/os/drivers/fs_interface.h

    r25268 r25414  
    233233typedef struct file_system_module_info { 
    234234        struct module_info      info; 
     235        const char*                     short_name; 
    235236        const char*                     pretty_name; 
    236237        uint32                          flags;  // DDM flags 
  • haiku/trunk/headers/private/fs_shell/fssh_fs_interface.h

    r25268 r25414  
    267267typedef struct fssh_file_system_module_info { 
    268268        struct fssh_module_info info; 
     269        const char*                             short_name; 
    269270        const char*                             pretty_name; 
    270271        uint32_t                                flags;  // DDM flags 
  • haiku/trunk/headers/private/kernel/disk_device_manager/ddm_modules.h

    r22475 r25414  
    1 // ddm_modules.h 
    2 // 
    3 // Interface to be implemented by partitioning modules
    4  
     1/* 
     2 * Copyright 2003-2008, Haiku Inc. 
     3 * Distributed under the terms of the MIT License
     4 */ 
    55#ifndef _K_DISK_DEVICE_MODULES_H 
    66#define _K_DISK_DEVICE_MODULES_H 
     7 
     8//! Interface to be implemented by partitioning modules. 
    79 
    810#include <disk_device_manager.h> 
     
    1315typedef struct partition_module_info { 
    1416        module_info                                                                     module; 
     17        const char*                                                                     short_name; 
    1518        const char*                                                                     pretty_name; 
    1619        uint32                                                                          flags; 
  • haiku/trunk/headers/private/kernel/disk_device_manager/ddm_userland_interface.h

    r22800 r25414  
    1 // ddm_userland_interface.h 
    2  
     1/* 
     2 * Copyright 2003-2008, Haiku Inc. 
     3 * Distributed under the terms of the MIT License. 
     4 * 
     5 * Authors: 
     6 *              Ingo Weinhold, bonefish@users.sf.net 
     7 */ 
    38#ifndef _DISK_DEVICE_MANAGER_USERLAND_INTERFACE_H 
    49#define _DISK_DEVICE_MANAGER_USERLAND_INTERFACE_H 
     
    5055        disk_system_id  id; 
    5156        char                    name[B_FILE_NAME_LENGTH];       // better B_PATH_NAME_LENGTH? 
     57        char                    short_name[B_OS_NAME_LENGTH]; 
    5258        char                    pretty_name[B_OS_NAME_LENGTH]; 
    5359        uint32                  flags; 
  • haiku/trunk/headers/private/kernel/disk_device_manager/KDiskSystem.h

    r22832 r25414  
    11/* 
    2  * Copyright 2003-2007, Haiku, Inc. All Rights Reserved. 
     2 * Copyright 2003-2008, Haiku, Inc. All Rights Reserved. 
    33 * Distributed under the terms of the MIT License. 
    44 * 
     
    88#ifndef _K_DISK_DEVICE_SYSTEM_H 
    99#define _K_DISK_DEVICE_SYSTEM_H 
     10 
    1011 
    1112#include "disk_device_manager.h" 
     
    3435 
    3536                        const char*                     Name() const; 
    36                         const char*                     PrettyName(); 
     37                        const char*                     ShortName() const; 
     38                        const char*                     PrettyName() const; 
    3739                        uint32                          Flags() const; 
    3840 
     
    98100        virtual void                            UnloadModule(); 
    99101 
     102                        status_t                        SetShortName(const char* name); 
    100103                        status_t                        SetPrettyName(const char* name); 
    101104                        void                            SetFlags(uint32 flags); 
     
    106109                        disk_system_id          fID; 
    107110                        char*                           fName; 
     111                        char*                           fShortName; 
    108112                        char*                           fPrettyName; 
    109113                        uint32                          fFlags; 
  • haiku/trunk/headers/private/storage/DiskDeviceRoster.h

    r22606 r25414  
    1 //---------------------------------------------------------------------- 
    2 //  This software is part of the OpenBeOS distribution and is covered  
    3 //  by the OpenBeOS license. 
    4 //--------------------------------------------------------------------- 
    5  
     1/* 
     2 * Copyright 2003-2008, Haiku Inc. 
     3 * Distributed under the terms of the MIT License. 
     4 */ 
    65#ifndef _DISK_DEVICE_ROSTER_H 
    76#define _DISK_DEVICE_ROSTER_H 
     
    8685class BDiskDeviceRoster { 
    8786public: 
    88         BDiskDeviceRoster(); 
    89         ~BDiskDeviceRoster(); 
    90          
    91         status_t GetNextDevice(BDiskDevice *device); 
    92         status_t RewindDevices(); 
    93          
    94         status_t GetNextDiskSystem(BDiskSystem *system); 
    95         status_t RewindDiskSystems(); 
     87                                                        BDiskDeviceRoster(); 
     88                                                        ~BDiskDeviceRoster(); 
    9689 
    97         partition_id RegisterFileDevice(const char *filename); 
    98                 // publishes: /dev/disk/virtual/files/<disk device ID>/raw 
    99         status_t UnregisterFileDevice(const char *filename); 
    100         status_t UnregisterFileDevice(partition_id device); 
     90                        status_t                GetNextDevice(BDiskDevice* device); 
     91                        status_t                RewindDevices(); 
    10192 
    102         bool VisitEachDevice(BDiskDeviceVisitor *visitor, 
    103                                                  BDiskDevice *device = NULL); 
    104         bool VisitEachPartition(BDiskDeviceVisitor *visitor, 
    105                                                         BDiskDevice *device = NULL, 
    106                                                         BPartition **partition = NULL); 
     93                        status_t                GetNextDiskSystem(BDiskSystem* system); 
     94                        status_t                RewindDiskSystems(); 
    10795 
    108         bool VisitEachMountedPartition(BDiskDeviceVisitor *visitor, 
    109                                                                    BDiskDevice *device = NULL, 
    110                                                                    BPartition **partition = NULL); 
    111         bool VisitEachMountablePartition(BDiskDeviceVisitor *visitor, 
    112                                                                          BDiskDevice *device = NULL, 
    113                                                                          BPartition **partition = NULL); 
    114                                                                           
    115         status_t GetDeviceWithID(partition_id id, BDiskDevice *device) const; 
    116         status_t GetPartitionWithID(partition_id id, BDiskDevice *device, 
    117                                                                 BPartition **partition) const; 
     96                        status_t                GetDiskSystem(BDiskSystem* system, const char* name); 
    11897 
    119         status_t GetDeviceForPath(const char *filename, BDiskDevice *device); 
    120         status_t GetPartitionForPath(const char *filename, BDiskDevice *device, 
    121                                                                  BPartition **partition); 
     98                        partition_id    RegisterFileDevice(const char* filename); 
     99                                // publishes: /dev/disk/virtual/files/<disk device ID>/raw 
     100                        status_t                UnregisterFileDevice(const char* filename); 
     101                        status_t                UnregisterFileDevice(partition_id device); 
    122102 
    123         status_t StartWatching(BMessenger target, 
    124                                                    uint32 eventMask = B_DEVICE_REQUEST_ALL); 
    125         status_t StopWatching(BMessenger target); 
     103                        bool                    VisitEachDevice(BDiskDeviceVisitor* visitor, 
     104                                                                BDiskDevice* device = NULL); 
     105                        bool                    VisitEachPartition(BDiskDeviceVisitor* visitor, 
     106                                                                BDiskDevice* device = NULL, 
     107                                                                BPartition** _partition = NULL); 
     108 
     109                        bool                    VisitEachMountedPartition( 
     110                                                                BDiskDeviceVisitor* visitor, 
     111                                                                BDiskDevice* device = NULL, 
     112                                                                BPartition** _partition = NULL); 
     113                        bool                    VisitEachMountablePartition( 
     114                                                                BDiskDeviceVisitor* visitor, 
     115                                                                BDiskDevice* device = NULL, 
     116                                                                BPartition** _partition = NULL); 
     117 
     118                        status_t                GetDeviceWithID(partition_id id, 
     119                                                                BDiskDevice* device) const; 
     120                        status_t                GetPartitionWithID(partition_id id, 
     121                                                                BDiskDevice* device, 
     122                                                                BPartition** _partition) const; 
     123 
     124                        status_t                GetDeviceForPath(const char* filename, 
     125                                                                BDiskDevice* device); 
     126                        status_t                GetPartitionForPath(const char* filename, 
     127                                                                BDiskDevice* device, BPartition** _partition); 
     128 
     129                        status_t                StartWatching(BMessenger target, 
     130                                                                uint32 eventMask = B_DEVICE_REQUEST_ALL); 
     131                        status_t                StopWatching(BMessenger target); 
    126132 
    127133private: 
     
    147153#endif  // 0 
    148154private: 
    149         int32           fDeviceCookie; 
    150         int32           fDiskSystemCookie; 
    151         int32           fJobCookie; 
     155        int32                                  fDeviceCookie; 
     156        int32                                  fDiskSystemCookie; 
     157        int32                                  fJobCookie; 
    152158//      BDirectory      *fPartitionAddOnDir; 
    153159//      BDirectory      *fFSAddOnDir; 
  • haiku/trunk/headers/private/storage/DiskSystem.h

    r22592 r25414  
    1 //---------------------------------------------------------------------- 
    2 //  This software is part of the OpenBeOS distribution and is covered  
    3 //  by the OpenBeOS license. 
    4 //--------------------------------------------------------------------- 
    5  
     1/* 
     2 * Copyright 2003-2008, Haiku Inc. 
     3 * Distributed under the terms of the MIT License. 
     4 */ 
    65#ifndef _DISK_SYSTEM_H 
    76#define _DISK_SYSTEM_H 
    87 
     8 
    99#include <DiskDeviceDefs.h> 
    1010#include <String.h> 
    11  
    1211 
    1312class BPartition; 
     
    1817class BDiskSystem { 
    1918public: 
    20         BDiskSystem(); 
    21         BDiskSystem(const BDiskSystem& other); 
    22         ~BDiskSystem(); 
     19                                                       BDiskSystem(); 
     20                                                       BDiskSystem(const BDiskSystem& other); 
     21                                                       ~BDiskSystem(); 
    2322 
    24         status_t InitCheck() const; 
     23                       status_t                InitCheck() const; 
    2524 
    26         const char *Name() const; 
    27         const char *PrettyName() const; 
     25                        const char*             Name() const; 
     26                        const char*             ShortName() const; 
     27                        const char*             PrettyName() const; 
    2828 
    29         bool SupportsDefragmenting(bool *whileMounted) const; 
    30         bool SupportsRepairing(bool checkOnly, bool *whileMounted) const; 
    31         bool SupportsResizing(bool *whileMounted) const; 
    32         bool SupportsResizingChild() const; 
    33         bool SupportsMoving(bool *whileMounted) const; 
    34         bool SupportsMovingChild() const; 
    35         bool SupportsName() const; 
    36         bool SupportsContentName() const; 
    37         bool SupportsSettingName() const; 
    38         bool SupportsSettingContentName(bool *whileMounted) const; 
    39         bool SupportsSettingType() const; 
    40         bool SupportsSettingParameters() const; 
    41         bool SupportsSettingContentParameters(bool *whileMounted) const; 
    42         bool SupportsCreatingChild() const; 
    43         bool SupportsDeletingChild() const; 
    44         bool SupportsInitializing() const; 
     29                        bool                    SupportsDefragmenting(bool* whileMounted) const; 
     30                        bool                    SupportsRepairing(bool checkOnly, 
     31                                                                bool* whileMounted) const; 
     32                        bool                    SupportsResizing(bool* whileMounted) const; 
     33                        bool                    SupportsResizingChild() const; 
     34                        bool                    SupportsMoving(bool* whileMounted) const; 
     35                        bool                    SupportsMovingChild() const; 
     36                        bool                    SupportsName() const; 
     37                        bool                    SupportsContentName() const; 
     38                        bool                    SupportsSettingName() const; 
     39                        bool                    SupportsSettingContentName( 
     40                                                                bool* whileMounted) const; 
     41                        bool                    SupportsSettingType() const; 
     42                        bool                    SupportsSettingParameters() const; 
     43                        bool                    SupportsSettingContentParameters( 
     44                                                                bool* whileMounted) const; 
     45                        bool                    SupportsCreatingChild() const; 
     46                        bool                    SupportsDeletingChild() const; 
     47                        bool                    SupportsInitializing() const; 
    4548 
    46         status_t GetTypeForContentType(const char *contentType, 
    47                 BString* type) const; 
     49                       status_t                GetTypeForContentType(const char* contentType, 
     50                                                               BString* type) const; 
    4851 
    49         bool IsPartitioningSystem() const; 
    50         bool IsFileSystem() const; 
     52                       bool                    IsPartitioningSystem() const; 
     53                       bool                    IsFileSystem() const; 
    5154 
    52         BDiskSystem& operator=(const BDiskSystem& other); 
     55                       BDiskSystem&    operator=(const BDiskSystem& other); 
    5356 
    5457private: 
    55         status_t _SetTo(disk_system_id id); 
    56         status_t _SetTo(const user_disk_system_info *info); 
    57         void _Unset(); 
     58                       status_t                _SetTo(disk_system_id id); 
     59                       status_t                _SetTo(const user_disk_system_info* info); 
     60                       void                    _Unset(); 
    5861 
     62private: 
    5963        friend class BDiskDeviceRoster; 
    6064        friend class BPartition; 
    6165 
    62         disk_system_id  fID; 
    63         BString                 fName; 
    64         BString                 fPrettyName; 
    65         uint32                  fFlags; 
     66        disk_system_id                  fID; 
     67        BString                                 fName; 
     68        BString                                 fShortName; 
     69        BString                                 fPrettyName; 
     70        uint32                                  fFlags; 
    6671}; 
    6772 
  • haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp

    r25144 r25414  
    22892289        }, 
    22902290 
    2291         "Be File System", 
     2291        "bfs",                                          // short_name 
     2292        "Be File System",                       // pretty_name 
    22922293 
    22932294        // DDM flags 
  • haiku/trunk/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp

    r22886 r25414  
    20072007        }, 
    20082008 
    2009         "CDDA File System", 
     2009        "cdda",                                 // short_name 
     2010        "CDDA File System",             // pretty_name 
    20102011        0,      // DDM flags 
    20112012 
  • haiku/trunk/src/add-ons/kernel/file_systems/fat/dosfs.c

    r24996 r25414  
    13141314        }, 
    13151315 
    1316         "FAT32 File System", 
     1316        "fat",                                  // short_name 
     1317        "FAT32 File System",    // pretty_name 
    13171318        0,      // DDM flags 
    13181319 
  • haiku/trunk/src/add-ons/kernel/file_systems/googlefs/googlefs.c

    r22043 r25414  
    16201620        }, 
    16211621 
    1622         GOOGLEFS_PRETTY_NAME, 
     1622        "googlefs",                                     // short_name 
     1623        GOOGLEFS_PRETTY_NAME,           // pretty_name 
    16231624        0,      // DDM flags 
    16241625 
  • haiku/trunk/src/add-ons/kernel/file_systems/iso9660/kernel_interface.cpp

    r24994 r25414  
    746746        }, 
    747747 
    748         "ISO9660 File System", 
    749         0,      // DDM flags 
     748        "iso9660",                                      // short_name 
     749        "ISO9660 File System",          // pretty_name 
     750        0,                                                      // DDM flags 
    750751 
    751752        // scanning 
  • haiku/trunk/src/add-ons/kernel/file_systems/ntfs/kernel_interface.c

    r22043 r25414  
    8585        }, 
    8686 
    87         "ntfs File System", 
    88         0,      // DDM flags 
     87        "ntfs",                                         // short_name 
     88        "Windows NT File System",       // pretty_name 
     89        0,                                                      // DDM flags 
    8990 
    9091        // scanning 
  • haiku/trunk/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp

    r24553 r25414  
    20702070        }, 
    20712071 
    2072         "RAM File System", 
    2073         0,      // DDM flags 
     2072        "ramfs",                                // short_name 
     2073        "RAM File System",              // pretty_name 
     2074        0,                                              // DDM flags 
    20742075 
    20752076        // scanning 
  • haiku/trunk/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp

    r22043 r25414  
    650650        }, 
    651651 
    652         "Reiser File System", 
    653         0,      // DDM flags 
     652        "reiserfs",                                     // short_name 
     653        "Reiser File System",           // pretty_name 
     654        0,                                                      // DDM flags 
    654655 
    655656        // scanning 
  • haiku/trunk/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp

    r8166 r25414  
    219219                amiga_rdb_std_ops 
    220220        }, 
     221        "amiga",                                                        // short_name 
    221222        AMIGA_PARTITION_NAME,                           // pretty_name 
    222223        0,                                                                      // flags 
  • haiku/trunk/src/add-ons/kernel/partitioning_systems/apple/apple.cpp

    r8166 r25414  
    204204                apple_std_ops 
    205205        }, 
     206        "apple",                                                        // short_name 
    206207        APPLE_PARTITION_NAME,                           // pretty_name 
    207208        0,                                                                      // flags 
  • haiku/trunk/src/add-ons/kernel/partitioning_systems/atari/atari.cpp

    r22745 r25414  
    11/* 
    2 ** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 
    3 ** Distributed under the terms of the Haiku License. 
    4 */ 
     2 * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 
     3 * Distributed under the terms of the MIT License. 
     4 */ 
    55 
    66 
     
    223223                atari_std_ops 
    224224        }, 
     225        "atari",                                                        // short_name 
    225226        ATARI_PARTITION_NAME,                           // pretty_name 
    226227        0,                                                                      // flags 
     
    241242}; 
    242243#endif 
    243  
  • haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp

    r21574 r25414  
    11/* 
    2  * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 
     2 * Copyright 2007-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 
    33 * Distributed under the terms of the MIT License. 
    44 */ 
     
    400400                efi_gpt_std_ops 
    401401        }, 
     402        "efi",                                                                  // short_name 
    402403        EFI_PARTITION_NAME,                                             // pretty_name 
    403404        0,                                                                              // flags 
  • haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/intel.cpp

    r22475 r25414  
    11/* 
    2  * Copyright 2003-2007, Haiku, Inc. All Rights Reserved. 
     2 * Copyright 2003-2008, Haiku, Inc. All Rights Reserved. 
    33 * Distributed under the terms of the MIT License. 
    44 * 
     
    428428                pm_std_ops 
    429429        }, 
     430        "intel",                                                        // short_name 
    430431        INTEL_PARTITION_NAME,                           // pretty_name 
    431432 
     
    514515                ep_std_ops 
    515516        }, 
     517        "intel_extended",                                       // short_name 
    516518        INTEL_EXTENDED_PARTITION_NAME,          // pretty_name 
    517519 
  • haiku/trunk/src/add-ons/kernel/partitioning_systems/session/session.cpp

    r23891 r25414  
    115115                standard_operations 
    116116        }, 
     117        "session",                                                      // short_name 
    117118        SESSION_PARTITION_NAME,                         // pretty_name 
    118119        0,                                                                      // flags 
  • haiku/trunk/src/kits/storage/disk_device/DiskDeviceRoster.cpp

    r23292 r25414  
    1 //---------------------------------------------------------------------- 
    2 //  This software is part of the OpenBeOS distribution and is covered  
    3 //  by the OpenBeOS license. 
    4 //--------------------------------------------------------------------- 
     1/* 
     2 * Copyright 2003-2008, Haiku, Inc. All Rights Reserved. 
     3 * Distributed under the terms of the MIT License. 
     4 * 
     5 * Authors: 
     6 *              Ingo Weinhold, bonefish@cs.tu-berlin.de 
     7 *              Axel Dörfler, axeld@pinc-software.de 
     8 */ 
    59 
    610#include <new> 
     
    8387        size_t neededSize = 0; 
    8488        partition_id id = _kern_get_next_disk_device_id(&fDeviceCookie, 
    85                                                                                                        &neededSize); 
     89                &neededSize); 
    8690        if (id < 0) 
    8791                return id; 
     
    100104} 
    101105 
    102 // GetNextDiskSystem 
    103 status_t 
    104 BDiskDeviceRoster::GetNextDiskSystem(BDiskSystem *system) 
     106 
     107status_t 
     108BDiskDeviceRoster::GetNextDiskSystem(BDiskSystem* system) 
    105109{ 
    106110        if (!system) 
     
    108112        user_disk_system_info info; 
    109113        status_t error = _kern_get_next_disk_system_info(&fDiskSystemCookie, 
    110                                                                                                         &info); 
     114                &info); 
    111115        if (error == B_OK) 
    112116                error = system->_SetTo(&info); 
     
    114118} 
    115119 
    116 // RewindDiskSystems 
     120 
    117121status_t 
    118122BDiskDeviceRoster::RewindDiskSystems() 
     
    123127 
    124128 
    125 // RegisterFileDevice 
     129status_t 
     130BDiskDeviceRoster::GetDiskSystem(BDiskSystem* system, const char* name) 
     131
     132        if (!system) 
     133                return B_BAD_VALUE; 
     134 
     135        int32 cookie = 0; 
     136        user_disk_system_info info; 
     137        while (_kern_get_next_disk_system_info(&fDiskSystemCookie, &info) == B_OK) { 
     138                if (!strcmp(name, info.name) 
     139                        || !strcmp(name, info.short_name) 
     140                        || !strcmp(name, info.pretty_name)) 
     141                        return system->_SetTo(&info); 
     142        } 
     143 
     144        return B_ENTRY_NOT_FOUND; 
     145
     146 
     147 
    126148partition_id 
    127149BDiskDeviceRoster::RegisterFileDevice(const char *filename) 
  • haiku/trunk/src/kits/storage/disk_device/DiskSystem.cpp

    r22607 r25414  
    1717// constructor 
    1818BDiskSystem::BDiskSystem() 
    19         : fID(B_NO_INIT), 
    20           fName(), 
    21           fPrettyName(), 
    22           fFlags(0) 
     19        : 
     20        fID(B_NO_INIT), 
     21        fFlags(0) 
    2322{ 
    2423} 
     
    2726// copy constructor 
    2827BDiskSystem::BDiskSystem(const BDiskSystem& other) 
    29         : fID(other.fID), 
    30           fName(other.fName), 
    31           fPrettyName(other.fPrettyName), 
    32           fFlags(other.fFlags) 
     28        : 
     29        fID(other.fID), 
     30        fName(other.fName), 
     31        fShortName(other.fShortName), 
     32        fPrettyName(other.fPrettyName), 
     33        fFlags(other.fFlags) 
    3334{ 
    3435} 
     
    4546BDiskSystem::InitCheck() const 
    4647{ 
    47         return (fID > 0 ? B_OK : fID)
     48        return fID > 0 ? B_OK : fID
    4849} 
    4950 
     
    5758 
    5859 
     60// ShortName 
     61const char* 
     62BDiskSystem::ShortName() const 
     63{ 
     64        return fShortName.String(); 
     65} 
     66 
     67 
    5968// PrettyName 
    6069const char* 
     
    7786 
    7887        if (whileMounted) { 
    79                 *whileMounted = (IsFileSystem() 
    80                         && (fFlags & B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED))
     88                *whileMounted = IsFileSystem() && (fFlags 
     89                               & B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED) != 0
    8190        } 
    8291 
     
    311320BDiskSystem::IsPartitioningSystem() const 
    312321{ 
    313         return (InitCheck() == B_OK && !(fFlags & B_DISK_SYSTEM_IS_FILE_SYSTEM)); 
     322        return InitCheck() == B_OK && !(fFlags & B_DISK_SYSTEM_IS_FILE_SYSTEM); 
    314323} 
    315324 
     
    319328BDiskSystem::IsFileSystem() const 
    320329{ 
    321         return (InitCheck() == B_OK && (fFlags & B_DISK_SYSTEM_IS_FILE_SYSTEM)); 
     330        return InitCheck() == B_OK && (fFlags & B_DISK_SYSTEM_IS_FILE_SYSTEM); 
    322331} 
    323332 
     
    329338        fID = other.fID; 
    330339        fName = other.fName; 
     340        fShortName = other.fShortName; 
    331341        fPrettyName = other.fPrettyName; 
    332342        fFlags = other.fFlags; 
     
    365375        fID = info->id; 
    366376        fName = info->name; 
     377        fShortName = info->short_name; 
    367378        fPrettyName = info->pretty_name; 
    368379        fFlags = info->flags; 
  • haiku/trunk/src/system/kernel/disk_device_manager/KDiskSystem.cpp

    r22832 r25414  
    2323        : fID(_NextID()), 
    2424          fName(NULL), 
     25          fShortName(NULL), 
    2526          fPrettyName(NULL), 
    2627          fLoadCounter(0) 
     
    3435{ 
    3536        free(fName); 
     37        free(fShortName); 
     38        free(fPrettyName); 
    3639} 
    3740 
     
    4144KDiskSystem::Init() 
    4245{ 
    43         return (fName ? B_OK : B_NO_MEMORY)
     46        return fName ? B_OK : B_NO_MEMORY
    4447} 
    4548 
     
    6972