diff --git a/Android.mk b/Android.mk index f87fec1..927d9e3 100644 --- a/Android.mk +++ b/Android.mk @@ -16,7 +16,6 @@ LOCAL_SRC_FILES:= \ VoldCommand.cpp \ NetlinkManager.cpp \ NetlinkHandler.cpp \ - BlockDevice.cpp \ Volume.cpp \ DirectVolume.cpp \ logwrapper.c \ diff --git a/BlockDevice.cpp b/BlockDevice.cpp deleted file mode 100644 index 97c980d..0000000 --- a/BlockDevice.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#define LOG_TAG "Vold" - -#include - -#include "BlockDevice.h" - -BlockDevice::BlockDevice(const char *devpath, int major, int minor) { - mDevpath = strdup(devpath); - mMajor = major; - mMinor = minor; -} - -BlockDevice::~BlockDevice() { - free(mDevpath); -} - diff --git a/BlockDevice.h b/BlockDevice.h deleted file mode 100644 index 0239824..0000000 --- a/BlockDevice.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _BLKDEVICE_H -#define _BLKDEVICE_H - -#include - -class BlockDevice { - - char *mDevpath; - int mMajor; - int mMinor; - -public: - BlockDevice(const char *devpath, int major, int minor); - virtual ~BlockDevice(); - - const char *getDevpath() { return mDevpath; } - int getMajor() { return mMajor; } - int getMinor() { return mMinor; } -}; - -typedef android::List BlockDeviceCollection; - -#endif diff --git a/VolumeManager.cpp b/VolumeManager.cpp index 77dad20..c8e4480 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp @@ -51,7 +51,6 @@ VolumeManager *VolumeManager::Instance() { VolumeManager::VolumeManager() { mDebug = false; - mBlockDevices = new BlockDeviceCollection(); mVolumes = new VolumeCollection(); mActiveContainers = new AsecIdCollection(); mBroadcaster = NULL; @@ -59,7 +58,6 @@ VolumeManager::VolumeManager() { } VolumeManager::~VolumeManager() { - delete mBlockDevices; delete mVolumes; delete mActiveContainers; } diff --git a/VolumeManager.h b/VolumeManager.h index b523f31..a675646 100644 --- a/VolumeManager.h +++ b/VolumeManager.h @@ -22,7 +22,6 @@ #include #include -#include "BlockDevice.h" #include "Volume.h" typedef android::List AsecIdCollection; @@ -33,7 +32,6 @@ private: private: SocketListener *mBroadcaster; - BlockDeviceCollection *mBlockDevices; VolumeCollection *mVolumes; AsecIdCollection *mActiveContainers;