forked from osbuild/images
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osbuild/device: use systemd-escape like escaping for mountable paths
Previously, the function used to escape filesystem paths of mountable entities, which are used as device names, could generate the same name for different devices. Specifically, it returned `root` as the device name for entity with `/` and `/root` mount point. This results in invalid osbuild manifests being generated. Rework the escaping function by implementing a similar escaping algorithm as used by systemd-escape, which will ensure that we always generate a unique device name for devices with different mountpoints, while still generating the same device name for the same device (with the same mountponit path). Signed-off-by: Tomáš Hozza <[email protected]>
- Loading branch information
1 parent
430cb77
commit 960e802
Showing
2 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters