diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-08 20:51:27 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-15 20:06:44 -0800 |
| commit | 6355150674b62f086b7c2bd82aad31973f748ada (patch) | |
| tree | 0198fadd3308317f10b9a7bc69e6260620a72102 /scripts/lib/wic/utils/partitionedfs.py | |
| parent | 86e190a6149bf364d278f01e7609c533465a17b6 (diff) | |
| download | poky-6355150674b62f086b7c2bd82aad31973f748ada.tar.gz | |
wic: partitionedfs: rename __create_partition and __add_disk
Renamed private methods with leading double underscores:
__create_partition -> _create_partition
__add_disk -> _add_disk
There is no point to have those names mangled, one underscore
is enough.
(From OE-Core rev: 26f3218070d34ccd4e81fa3b8e1a15c03583d070)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/utils/partitionedfs.py')
| -rw-r--r-- | scripts/lib/wic/utils/partitionedfs.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 2cfdf70cde..b7ab1d528e 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py | |||
| @@ -49,7 +49,7 @@ class Image(): | |||
| 49 | self._partitions_layed_out = False | 49 | self._partitions_layed_out = False |
| 50 | self.native_sysroot = native_sysroot | 50 | self.native_sysroot = native_sysroot |
| 51 | 51 | ||
| 52 | def __add_disk(self, disk_name): | 52 | def _add_disk(self, disk_name): |
| 53 | """ Add a disk 'disk_name' to the internal list of disks. Note, | 53 | """ Add a disk 'disk_name' to the internal list of disks. Note, |
| 54 | 'disk_name' is the name of the disk in the target system | 54 | 'disk_name' is the name of the disk in the target system |
| 55 | (e.g., sdb). """ | 55 | (e.g., sdb). """ |
| @@ -76,7 +76,7 @@ class Image(): | |||
| 76 | can be added. In case of multiple disks, disk partitions have to be | 76 | can be added. In case of multiple disks, disk partitions have to be |
| 77 | added for each disk separately with 'add_partition()". """ | 77 | added for each disk separately with 'add_partition()". """ |
| 78 | 78 | ||
| 79 | self.__add_disk(disk_name) | 79 | self._add_disk(disk_name) |
| 80 | self.disks[disk_name]['disk'] = disk_obj | 80 | self.disks[disk_name]['disk'] = disk_obj |
| 81 | self.disks[disk_name]['identifier'] = identifier | 81 | self.disks[disk_name]['identifier'] = identifier |
| 82 | 82 | ||
| @@ -217,7 +217,7 @@ class Image(): | |||
| 217 | 217 | ||
| 218 | disk['min_size'] *= self.sector_size | 218 | disk['min_size'] *= self.sector_size |
| 219 | 219 | ||
| 220 | def __create_partition(self, device, parttype, fstype, start, size): | 220 | def _create_partition(self, device, parttype, fstype, start, size): |
| 221 | """ Create a partition on an image described by the 'device' object. """ | 221 | """ Create a partition on an image described by the 'device' object. """ |
| 222 | 222 | ||
| 223 | # Start is included to the size so we need to substract one from the end. | 223 | # Start is included to the size so we need to substract one from the end. |
| @@ -272,9 +272,9 @@ class Image(): | |||
| 272 | # starts a sector before the first logical partition, | 272 | # starts a sector before the first logical partition, |
| 273 | # add a sector at the back, so that there is enough | 273 | # add a sector at the back, so that there is enough |
| 274 | # room for all logical partitions. | 274 | # room for all logical partitions. |
| 275 | self.__create_partition(disk['disk'].device, "extended", | 275 | self._create_partition(disk['disk'].device, "extended", |
| 276 | None, part['start'] - 1, | 276 | None, part['start'] - 1, |
| 277 | disk['offset'] - part['start'] + 1) | 277 | disk['offset'] - part['start'] + 1) |
| 278 | 278 | ||
| 279 | if part['fstype'] == "swap": | 279 | if part['fstype'] == "swap": |
| 280 | parted_fs_type = "linux-swap" | 280 | parted_fs_type = "linux-swap" |
| @@ -297,8 +297,8 @@ class Image(): | |||
| 297 | part['mountpoint']) | 297 | part['mountpoint']) |
| 298 | part['size'] -= 1 | 298 | part['size'] -= 1 |
| 299 | 299 | ||
| 300 | self.__create_partition(disk['disk'].device, part['type'], | 300 | self._create_partition(disk['disk'].device, part['type'], |
| 301 | parted_fs_type, part['start'], part['size']) | 301 | parted_fs_type, part['start'], part['size']) |
| 302 | 302 | ||
| 303 | if part['part_type']: | 303 | if part['part_type']: |
| 304 | msger.debug("partition %d: set type UID to %s" % \ | 304 | msger.debug("partition %d: set type UID to %s" % \ |
