/* $NetBSD: menus.pm,v 1.3 2020/01/09 13:22:30 martin Exp $ */
/* NetBSD: menus.mi,v 1.14 2018/09/11 08:05:18 martin Exp */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by David Laight.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* Menu system definitions -- extended partitioning */
/* arg is a struct part_entry* */
menu shred_modes, x=50, y=5, exit, default exit;
option MSG_fillzeros, exit,
action { pm_shred(arg, SHRED_ZEROS); };
option MSG_fillrandom, exit,
action { pm_shred(arg, SHRED_RANDOM); };
/* arg is a int pointer for the requested raid level */
menu raidlevel;
option MSG_raid0, exit, action { *(int *)arg = 0; };
option MSG_raid1, exit, action { *(int *)arg = 1; };
option MSG_raid4, exit, action { *(int *)arg = 4; };
option MSG_raid5, exit, action { *(int *)arg = 5; };
/* arg is a const char ** set to the selected encryption type */
menu cgd_enctype;
option "aes-xts", exit, action { *(const char**)arg = "aes-xts"; };
option "aes-cbc", exit, action { *(const char**)arg = "aes-cbc"; };
option "3des-cbc", exit, action { *(const char**)arg = "3des-cbc"; };
option "blowfish-cbc", exit, action
{ *(const char**)arg = "blowfish-cbc"; };
/* arg is a const char ** set to the requested iv type */
menu cgd_ivtype;
option "encblkno1", exit, action { *(const char**)arg = "encblkno1"; };
option "encblkno8", exit, action { *(const char**)arg = "encblkno8"; };