kernel/disk_device_manager: Cleanup code style, fix some minor TODOs.
This commit is contained in:
@@ -27,8 +27,6 @@ public:
|
||||
|
||||
status_t SetTo(const char *path);
|
||||
void Unset();
|
||||
virtual status_t InitCheck() const;
|
||||
// TODO: probably superfluous
|
||||
|
||||
// A read lock owner can be sure that the device (incl. all of its
|
||||
// partitions won't be changed).
|
||||
@@ -60,16 +58,11 @@ public:
|
||||
|
||||
void UpdateGeometry();
|
||||
|
||||
status_t SetPath(const char *path);
|
||||
// TODO: Remove this method or make it private. Once initialized the
|
||||
// path must not be changed.
|
||||
const char *Path() const;
|
||||
virtual status_t GetFileName(char* buffer, size_t size) const;
|
||||
virtual status_t GetPath(KPath *path) const;
|
||||
|
||||
// File descriptor: Set only from a kernel thread, valid only for
|
||||
// kernel threads.
|
||||
void SetFD(int fd);
|
||||
// File descriptor: valid only for kernel threads.
|
||||
int FD() const;
|
||||
|
||||
// access to C style device data
|
||||
@@ -101,6 +94,8 @@ private:
|
||||
} // namespace DiskDevice
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
using BPrivate::DiskDevice::KDiskDevice;
|
||||
|
||||
|
||||
#endif // _K_DISK_DEVICE_H
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
// KFileDiskDevice.h
|
||||
|
||||
/*
|
||||
* Copyright 2003-2009, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _K_FILE_DISK_DEVICE_H
|
||||
#define _K_FILE_DISK_DEVICE_H
|
||||
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include "KDiskDevice.h"
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
namespace DiskDevice {
|
||||
|
||||
|
||||
class KPath;
|
||||
|
||||
class KFileDiskDevice : public KDiskDevice {
|
||||
|
||||
class KFileDiskDevice final : public KDiskDevice {
|
||||
public:
|
||||
KFileDiskDevice(partition_id id = -1);
|
||||
virtual ~KFileDiskDevice();
|
||||
|
||||
status_t SetTo(const char *filePath, const char *devicePath = NULL);
|
||||
void Unset();
|
||||
virtual status_t InitCheck() const;
|
||||
// TODO: probably superfluous
|
||||
|
||||
const char *FilePath() const;
|
||||
|
||||
@@ -40,9 +44,12 @@ private:
|
||||
char *fFilePath;
|
||||
};
|
||||
|
||||
|
||||
} // namespace DiskDevice
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
using BPrivate::DiskDevice::KFileDiskDevice;
|
||||
|
||||
|
||||
#endif // _K_FILE_DISK_DEVICE_H
|
||||
|
||||
@@ -8,14 +8,18 @@
|
||||
#ifndef _K_DISK_DEVICE_PARTITION_H
|
||||
#define _K_DISK_DEVICE_PARTITION_H
|
||||
|
||||
|
||||
#include <disk_device_manager.h>
|
||||
#include <Vector.h>
|
||||
|
||||
|
||||
struct user_partition_data;
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
namespace DiskDevice {
|
||||
|
||||
|
||||
class UserDataWriter;
|
||||
|
||||
class KDiskDevice;
|
||||
@@ -25,6 +29,7 @@ class KPartitionVisitor;
|
||||
class KPath;
|
||||
class KPhysicalPartition;
|
||||
|
||||
|
||||
//! \brief Class representing a single partition.
|
||||
class KPartition {
|
||||
public:
|
||||
@@ -235,9 +240,12 @@ protected:
|
||||
static int32 sNextID;
|
||||
};
|
||||
|
||||
|
||||
} // namespace DiskDevice
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
using BPrivate::DiskDevice::KPartition;
|
||||
|
||||
|
||||
#endif // _K_DISK_DEVICE_PARTITION_H
|
||||
|
||||
Reference in New Issue
Block a user