Merge "Add label to virtual floppy image"
This commit is contained in:
commit
00dfc4c5c3
@ -112,7 +112,10 @@ def create_vfat_image(output_file, files_info=None, parameters=None,
|
||||
with utils.tempdir() as tmpdir:
|
||||
|
||||
try:
|
||||
utils.mkfs('vfat', output_file)
|
||||
# The label helps ramdisks to find the partition containing
|
||||
# the parameters (by using /dev/disk/by-label/ir-vfd-dev).
|
||||
# NOTE: FAT filesystem label can be up to 11 characters long.
|
||||
utils.mkfs('vfat', output_file, label="ir-vfd-dev")
|
||||
utils.mount(output_file, tmpdir, '-o', 'umask=0')
|
||||
except processutils.ProcessExecutionError as e:
|
||||
raise exception.ImageCreationFailed(image_type='vfat', error=e)
|
||||
|
@ -270,7 +270,8 @@ class FsImageTestCase(base.TestCase):
|
||||
'count=1',
|
||||
'bs=1000KiB')
|
||||
|
||||
mkfs_mock.assert_called_once_with('vfat', 'tgt_file')
|
||||
mkfs_mock.assert_called_once_with('vfat', 'tgt_file',
|
||||
label="ir-vfd-dev")
|
||||
mount_mock.assert_called_once_with('tgt_file', 'tempdir',
|
||||
'-o', 'umask=0')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user