Skip to content

Commit

Permalink
Cleaning and adding a valide mkfs conf in testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
upils committed Dec 6, 2023
1 parent 51314fe commit e88e34f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
3 changes: 0 additions & 3 deletions internal/statemachine/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,11 @@ func (stateMachine *StateMachine) copyStructureContent(volume *gadget.Volume,
contentRoot, err.Error())
}

fmt.Printf("current MKE2FS_CONFIG_ENV: %v", os.Getenv(MKE2FS_CONFIG_ENV))
// select the mkfs.ext4 conf to use
err = stateMachine.setMk2fsConf()
if err != nil {
return fmt.Errorf("Error preparing env for mkfs: %s", err.Error())
}
fmt.Printf("after setting it MKE2FS_CONFIG_ENV: %v", os.Getenv(MKE2FS_CONFIG_ENV))
// defer os.Unsetenv(MKE2FS_CONFIG_ENV)

// use mkfs functions from snapd to create the filesystems
if structure.Content != nil || len(contentFiles) > 0 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
test
[defaults]
base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384

[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
}
small = {
inode_ratio = 4096
}
floppy = {
inode_ratio = 8192
}
big = {
inode_ratio = 32768
}
huge = {
inode_ratio = 65536
}
news = {
inode_ratio = 4096
}
largefile = {
inode_ratio = 1048576
blocksize = -1
}
largefile4 = {
inode_ratio = 4194304
blocksize = -1
}
hurd = {
blocksize = 4096
inode_size = 128
warn_y2038_dates = 0
}

0 comments on commit e88e34f

Please sign in to comment.