variable.c (64033) | variable.c (79304) |
---|---|
1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * | 1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * |
7 * $FreeBSD: head/usr.sbin/sysinstall/variable.c 64033 2000-07-30 22:18:53Z jkh $ | 7 * $FreeBSD: head/usr.sbin/sysinstall/variable.c 79304 2001-07-05 09:51:09Z kris $ |
8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 143 unchanged lines hidden (view full) --- 159char * 160variable_get_value(char *var, char *prompt, int dirty) 161{ 162 char *cp; 163 164 cp = variable_get(var); 165 if (cp && variable_get(VAR_NONINTERACTIVE)) 166 return cp; | 8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 143 unchanged lines hidden (view full) --- 159char * 160variable_get_value(char *var, char *prompt, int dirty) 161{ 162 char *cp; 163 164 cp = variable_get(var); 165 if (cp && variable_get(VAR_NONINTERACTIVE)) 166 return cp; |
167 else if ((cp = msgGetInput(cp, prompt)) != NULL) | 167 else if ((cp = msgGetInput(cp, "%s", prompt)) != NULL) |
168 variable_set2(var, cp, dirty); 169 else 170 cp = NULL; 171 return cp; 172} 173 174/* Check if value passed in data (in the form "variable=value") is equal to value of 175 variable stored in env */ --- 54 unchanged lines hidden --- | 168 variable_set2(var, cp, dirty); 169 else 170 cp = NULL; 171 return cp; 172} 173 174/* Check if value passed in data (in the form "variable=value") is equal to value of 175 variable stored in env */ --- 54 unchanged lines hidden --- |