| 1 |
# |
| 2 |
# UML specific functions |
| 3 |
# |
| 4 |
################################################################ |
| 5 |
# |
| 6 |
# Copyright (c) 1995-2014 SUSE Linux Products GmbH |
| 7 |
# |
| 8 |
# This program is free software; you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License version 2 or 3 as |
| 10 |
# published by the Free Software Foundation. |
| 11 |
# |
| 12 |
# This program is distributed in the hope that it will be useful, |
| 13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
# GNU General Public License for more details. |
| 16 |
# |
| 17 |
# You should have received a copy of the GNU General Public License |
| 18 |
# along with this program (see the file COPYING); if not, write to the |
| 19 |
# Free Software Foundation, Inc., |
| 20 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 21 |
# |
| 22 |
################################################################ |
| 23 |
|
| 24 |
uml_kernel=/boot/vmlinux-um |
| 25 |
uml_initrd=/boot/initrd-um |
| 26 |
|
| 27 |
vm_verify_options_uml() { |
| 28 |
VM_SWAPDEV=/dev/sdb |
| 29 |
} |
| 30 |
|
| 31 |
vm_startup_uml() { |
| 32 |
set -- $uml_kernel initrd=$uml_initrd root=ubda init="$vm_init_script" panic=1 elevator=noop quiet ubda=$VM_ROOT ubdb=$VM_SWAP ${VM_MEMSIZE:+mem=$VM_MEMSIZE} |
| 33 |
echo "$@" |
| 34 |
"$@" |
| 35 |
} |
| 36 |
|
| 37 |
vm_kill_uml() { |
| 38 |
if ! fuser -k -TERM "$VM_ROOT"; then |
| 39 |
cleanup_and_exit 1 "could not kill build in $VM_ROOT" |
| 40 |
fi |
| 41 |
} |
| 42 |
|
| 43 |
vm_fixup_uml() { |
| 44 |
: |
| 45 |
} |
| 46 |
|
| 47 |
vm_attach_root_uml() { |
| 48 |
: |
| 49 |
} |
| 50 |
|
| 51 |
vm_attach_swap_uml() { |
| 52 |
: |
| 53 |
} |
| 54 |
|
| 55 |
vm_detach_root_uml() { |
| 56 |
: |
| 57 |
} |
| 58 |
|
| 59 |
vm_detach_swap_uml() { |
| 60 |
: |
| 61 |
} |
| 62 |
|
| 63 |
vm_cleanup_uml() { |
| 64 |
: |
| 65 |
} |
| 66 |
|
| 67 |
vm_sysrq_uml() { |
| 68 |
: |
| 69 |
} |
| 70 |
|
| 71 |
vm_wipe_uml() { |
| 72 |
: |
| 73 |
} |
| 74 |
|