From: Sascha Wildner Date: Fri, 15 May 2009 21:47:13 +0000 (+0200) Subject: installer: Remove some dead code and raise WARNS to 2. X-Git-Tag: v2.3.2~257^2~19 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/66764e147c479ff7fa44c38053cf2c405314ce10 installer: Remove some dead code and raise WARNS to 2. --- diff --git a/usr.sbin/installer/Makefile.inc b/usr.sbin/installer/Makefile.inc index ad6e982e6d..1f5b79aa2c 100644 --- a/usr.sbin/installer/Makefile.inc +++ b/usr.sbin/installer/Makefile.inc @@ -1,3 +1,3 @@ -WARNS?= 1 +WARNS?= 2 .include "../Makefile.inc" diff --git a/usr.sbin/installer/dfuibe_installer/fn_subpart_hammer.c b/usr.sbin/installer/dfuibe_installer/fn_subpart_hammer.c index c2db08cf1e..4f6cb35e88 100644 --- a/usr.sbin/installer/dfuibe_installer/fn_subpart_hammer.c +++ b/usr.sbin/installer/dfuibe_installer/fn_subpart_hammer.c @@ -88,7 +88,6 @@ create_subpartitions(struct i_fn_args *a) struct subpartition *sp; struct commands *cmds; int result = 0; - int copied_original = 0; int num_partitions; cmds = commands_new(); @@ -319,7 +318,6 @@ check_subpartition_selections(struct dfui_response *r, struct i_fn_args *a) struct aura_dict *d; const char *mountpoint, *capstring; long capacity = 0; - long bsize, fsize; int found_root = 0; int valid = 1; @@ -337,20 +335,7 @@ check_subpartition_selections(struct dfui_response *r, struct i_fn_args *a) #endif mountpoint = dfui_dataset_get_value(ds, "mountpoint"); capstring = dfui_dataset_get_value(ds, "capacity"); -#if 0 - if (expert) { - softupdates = - (strcmp(dfui_dataset_get_value(ds, "softupdates"), "Y") == 0); - fsize = atol(dfui_dataset_get_value(ds, "fsize")); - bsize = atol(dfui_dataset_get_value(ds, "bsize")); - mfsbacked = (strcmp(dfui_dataset_get_value(ds, "mfsbacked"), "Y") == 0); - } else { - softupdates = (strcmp(mountpoint, "/") == 0 ? 0 : 1); - mfsbacked = (strcmp(mountpoint, "/tmp") == 0 ? 0 : 1); - fsize = -1; - bsize = -1; - } -#endif + if (aura_dict_exists(d, mountpoint, strlen(mountpoint) + 1)) { inform(a->c, _("The same mount point cannot be specified " "for two different subpartitions.")); @@ -432,10 +417,8 @@ static void save_subpartition_selections(struct dfui_response *r, struct i_fn_args *a) { struct dfui_dataset *ds; - char mfsbacked; const char *mountpoint, *capstring; long capacity; - long bsize, fsize; int valid = 1; subpartitions_free(storage_get_selected_slice(a->s)); @@ -444,20 +427,7 @@ save_subpartition_selections(struct dfui_response *r, struct i_fn_args *a) ds = dfui_dataset_get_next(ds)) { mountpoint = dfui_dataset_get_value(ds, "mountpoint"); capstring = dfui_dataset_get_value(ds, "capacity"); -#if 0 - if (expert) { - softupdates = - (strcmp(dfui_dataset_get_value(ds, "softupdates"), "Y") == 0); - fsize = atol(dfui_dataset_get_value(ds, "fsize")); - bsize = atol(dfui_dataset_get_value(ds, "bsize")); - mfsbacked = (strcmp(dfui_dataset_get_value(ds, "mfsbacked"), "Y") == 0); - } else { - softupdates = (strcmp(mountpoint, "/") == 0 ? 0 : 1); - mfsbacked = 0; - fsize = -1; - bsize = -1; - } -#endif + if (string_to_capacity(capstring, &capacity)) { subpartition_new_hammer(storage_get_selected_slice(a->s), mountpoint, capacity); @@ -470,7 +440,6 @@ populate_create_subpartitions_form(struct dfui_form *f, struct i_fn_args *a) { struct subpartition *sp; struct dfui_dataset *ds; - char temp[32]; int mtpt; long capacity; @@ -572,7 +541,6 @@ warn_subpartition_selections(struct i_fn_args *a) static struct dfui_form * make_create_subpartitions_form(struct i_fn_args *a) { - struct dfui_field *fi; struct dfui_form *f; char msg_buf[1][1024];