aboutsummaryrefslogtreecommitdiffstats
path: root/brillo/blkdev_utils/loop_device.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use base::NumberToString to replace base::(Int|Int64|Uint)ToStringQijiang Fan2020-04-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ToString functions will be unified to base::NumberToString BUG=chromium:1054279 TEST=CQ Exempt-From-Owner-Approval: Mechanical change involving a lot of owners. Change-Id: Ie7d5825e1243b213a38b9f1fb709f9a5642be507 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2129613 Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Reviewed-by: Ian Barkley-Yeung <iby@chromium.org> Reviewed-by: Polina Bondarenko <pbond@chromium.org> Reviewed-by: Felipe Andrade <fsandrade@chromium.org> Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-by: Andrew Moylan <amoylan@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Sergei Datsenko <dats@chromium.org> Reviewed-by: Leo Lai <cylai@google.com> Reviewed-by: Clark Chung <ckclark@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Qijiang Fan <fqj@google.com> Tested-by: Qijiang Fan <fqj@google.com> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: 26fd922846483d7b3611e9da7b1133dd57f272dc
* Reland "libbrillo: add LoopDeviceManager and LoopDevice."Sarthak Kukreti2019-02-151-0/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of c2e72e73f06d33a8d6421bb3ee3f06e46106513f Reason for revert: chromium:887667 Original change's description: > libbrillo: add LoopDeviceManager and LoopDevice. > > LoopDeviceManager manages the creation of LoopDevice > objects that represent attached loop devices. In order > to simplify the state of LoopDevices, the private class > members of LoopDevice are constant set at creation. > LoopDeviceManager can be queried to create LoopDevice > objects for already attached devices. Search for attached > loop devices can be done by name or by number, or the > complete list of attached devices. > > LoopDevice abstracts the ioctl related functions to a > ioctl runner, which can be replaced by a fake implementation, > as in loop_device_unittest.cc > > (Additional review context: https://chromium-review.googlesource.com/1020238) > > BUG=chromium:808303 > TEST=FEATURES=test emerge libbrillo > > Change-Id: I569d8f12dca90468013b431f594b061ea7550cab > Reviewed-on: https://chromium-review.googlesource.com/1187156 > Commit-Ready: Gwendal Grignou <gwendal@chromium.org> > Tested-by: Gwendal Grignou <gwendal@chromium.org> > Reviewed-by: Gwendal Grignou <gwendal@chromium.org> BUG=chromium:808303,chromium:887667 TEST=unit tests. Change-Id: I24e30e4414c0f200fd85b892e1511e743f1e5e0c Reviewed-on: https://chromium-review.googlesource.com/1341225 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Sarthak Kukreti <sarthakkukreti@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: 6db537f182b4640683040e9725e110027289672f
* Revert "libbrillo: add LoopDeviceManager and LoopDevice."Sarthak Kukreti2018-09-211-272/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c2e72e73f06d33a8d6421bb3ee3f06e46106513f. Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=887667 Original change's description: > libbrillo: add LoopDeviceManager and LoopDevice. > > LoopDeviceManager manages the creation of LoopDevice > objects that represent attached loop devices. In order > to simplify the state of LoopDevices, the private class > members of LoopDevice are constant set at creation. > > LoopDeviceManager can be queried to create LoopDevice > objects for already attached devices. Search for attached > loop devices can be done by name or by number, or the > complete list of attached devices. > > LoopDevice abstracts the ioctl related functions to a > ioctl runner, which can be replaced by a fake implementation, > as in loop_device_unittest.cc > > (Additional review context: https://chromium-review.googlesource.com/1020238) > > BUG=chromium:808303 > TEST=FEATURES=test emerge libbrillo > > Change-Id: I569d8f12dca90468013b431f594b061ea7550cab > Reviewed-on: https://chromium-review.googlesource.com/1187156 > Commit-Ready: Gwendal Grignou <gwendal@chromium.org> > Tested-by: Gwendal Grignou <gwendal@chromium.org> > Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Bug: chromium:808303 Change-Id: I147df040914ecfdd802d36a88918c1243a1d3728 Reviewed-on: https://chromium-review.googlesource.com/1237601 Reviewed-by: Derek Basehore <dbasehore@chromium.org> Tested-by: Sarthak Kukreti <sarthakkukreti@chromium.org> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: aba1b6ce95d9afe0f4a552129a4f182dc8170577
* libbrillo: add LoopDeviceManager and LoopDevice.Sarthak Kukreti2018-09-201-0/+272
LoopDeviceManager manages the creation of LoopDevice objects that represent attached loop devices. In order to simplify the state of LoopDevices, the private class members of LoopDevice are constant set at creation. LoopDeviceManager can be queried to create LoopDevice objects for already attached devices. Search for attached loop devices can be done by name or by number, or the complete list of attached devices. LoopDevice abstracts the ioctl related functions to a ioctl runner, which can be replaced by a fake implementation, as in loop_device_unittest.cc (Additional review context: https://chromium-review.googlesource.com/1020238) BUG=chromium:808303 TEST=FEATURES=test emerge libbrillo Change-Id: I569d8f12dca90468013b431f594b061ea7550cab Reviewed-on: https://chromium-review.googlesource.com/1187156 Commit-Ready: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: c2e72e73f06d33a8d6421bb3ee3f06e46106513f