Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / storage_monitor / udev_util_linux.h
blobe2611cde7d313e14fd26fcc60f8cac32a39d95e8
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_
6 #define COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 struct udev_device;
14 namespace base {
15 class FilePath;
18 namespace storage_monitor {
20 // Helper for udev_device_new_from_syspath()/udev_device_get_property_value()
21 // pair. |device_path| is the absolute path to the device, including /sys.
22 bool GetUdevDevicePropertyValueByPath(const base::FilePath& device_path,
23 const char* key,
24 std::string* result);
26 } // namespace storage_monitor
28 #endif // COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_