udevd: use partition enumerator at one more place

No functional changes, just refactoring.
This commit is contained in:
Yu Watanabe
2022-09-10 00:48:34 +09:00
parent e97589cf38
commit 9409174ee7
3 changed files with 7 additions and 35 deletions
+1 -1
View File
@@ -509,7 +509,7 @@ int block_device_resize_partition(
return RET_NERRNO(ioctl(fd, BLKPG, &ba));
}
static int partition_enumerator_new(sd_device *dev, sd_device_enumerator **ret) {
int partition_enumerator_new(sd_device *dev, sd_device_enumerator **ret) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
const char *s;
int r;
+1
View File
@@ -36,5 +36,6 @@ int path_get_whole_disk(const char *path, bool backing, dev_t *ret);
int block_device_add_partition(int fd, const char *name, int nr, uint64_t start, uint64_t size);
int block_device_remove_partition(int fd, const char *name, int nr);
int block_device_resize_partition(int fd, int nr, uint64_t start, uint64_t size);
int partition_enumerator_new(sd_device *dev, sd_device_enumerator **ret);
int block_device_remove_all_partitions(sd_device *dev, int fd);
int block_device_has_partitions(sd_device *dev);