diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-26 00:28:56 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-26 00:28:56 (EDT) |
commit | 456aa9142b32b226bd27b8384291a64e90e51ffb (patch) | |
tree | c62839632143a985771fdfd03dfa557ed232ca81 | |
parent | 5295b41e5fe90db9f2af91a0ba6d9e7b662e346d (diff) |
src/cmd/installer-pc.sh: Make some functions "static"
-rw-r--r-- | src/cmd/installer-pc.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh index b41402a..36baef7 100644 --- a/src/cmd/installer-pc.sh +++ b/src/cmd/installer-pc.sh @@ -20,7 +20,7 @@ cmd_installer_pc_optstring='a:p:m:' -cmd_installer_pc_log_print() +_cmd_installer_pc_log_print() { local prefix="${1}" local log="${2}" @@ -33,7 +33,7 @@ cmd_installer_pc_log_print() unset IFS } -cmd_installer_pc_make_partition_and_fs() +_cmd_installer_pc_make_partition_and_fs() { local dev="${1}" local log= @@ -41,7 +41,7 @@ cmd_installer_pc_make_partition_and_fs() info "$(get_msg 'cmd_installer_pc_dd')" if ! log="$(dd if=/dev/zero of="${dev}" bs=512 count=1 2>&1)"; then error "$(get_msg 'cmd_installer_pc_dd_fail')" - cmd_installer_pc_log_print 'dd' "${log}" + _cmd_installer_pc_log_print 'dd' "${log}" return 1 fi @@ -49,14 +49,14 @@ cmd_installer_pc_make_partition_and_fs() if ${HAVE_SFDISK}; then if ! log="$(printf ',,83,*\n' | ${SFDISK} "${dev}" 2>&1)"; then error "$(get_msg 'cmd_installer_pc_fdisk_fail')" - cmd_installer_pc_log_print 'sfdisk' "${log}" + _cmd_installer_pc_log_print 'sfdisk' "${log}" return 1 fi elif ${HAVE_FDISK}; then if ! log="$(printf 'n\np\n1\n\n\nt\n83\na\n1\nw\n' | ${FDISK} "${dev}" 2>&1)"; then error "$(get_msg 'cmd_installer_pc_fdisk_fail')" - cmd_installer_pc_log_print 'fdisk' "${log}" + _cmd_installer_pc_log_print 'fdisk' "${log}" return 1 fi fi @@ -64,7 +64,7 @@ cmd_installer_pc_make_partition_and_fs() info "$(get_msg 'cmd_installer_pc_mkfs')" if ! log="$(${MKE2FS} -t ext4 "${dev}1" 2>&1)"; then error "$(get_msg 'cmd_installer_pc_mkfs_fail')" - cmd_installer_pc_log_print 'mke2fs' "${log}" + _cmd_installer_pc_log_print 'mke2fs' "${log}" return 1 fi @@ -118,7 +118,7 @@ cmd_installer_pc_main() fi suite="$(profile_normalize_suite "${suite}")" - if ! cmd_installer_pc_make_partition_and_fs "${dev}"; then + if ! _cmd_installer_pc_make_partition_and_fs "${dev}"; then return 2 fi if ! root="$(block_mount "${dev}1")"; then |