Deleted Added
full compact
config.y (129073) config.y (134542)
1%union {
2 char *str;
3 int val;
4 struct file_list *file;
5}
6
7%token ARCH
8%token COMMA

--- 52 unchanged lines hidden (view full) ---

61 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
62 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
64 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
65 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
66 * SUCH DAMAGE.
67 *
68 * @(#)config.y 8.1 (Berkeley) 6/6/93
1%union {
2 char *str;
3 int val;
4 struct file_list *file;
5}
6
7%token ARCH
8%token COMMA

--- 52 unchanged lines hidden (view full) ---

61 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
62 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
64 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
65 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
66 * SUCH DAMAGE.
67 *
68 * @(#)config.y 8.1 (Berkeley) 6/6/93
69 * $FreeBSD: head/usr.sbin/config/config.y 129073 2004-05-09 22:29:00Z cognet $
69 * $FreeBSD: head/usr.sbin/config/config.y 134542 2004-08-30 23:03:58Z peter $
70 */
71
72#include <ctype.h>
73#include <err.h>
74#include <stdio.h>
75#include <string.h>
76
77#include "config.h"

--- 167 unchanged lines hidden (view full) ---

245 = { $$ = $1; }
246 ;
247
248Device_spec:
249 DEVICE Dev
250 = {
251 newopt(&opt, devopt($2), ns("1"));
252 /* and the device part */
70 */
71
72#include <ctype.h>
73#include <err.h>
74#include <stdio.h>
75#include <string.h>
76
77#include "config.h"

--- 167 unchanged lines hidden (view full) ---

245 = { $$ = $1; }
246 ;
247
248Device_spec:
249 DEVICE Dev
250 = {
251 newopt(&opt, devopt($2), ns("1"));
252 /* and the device part */
253 newdev($2, UNKNOWN);
253 newdev($2);
254 } |
254 } |
255 DEVICE Dev NUMBER
256 = {
257 newopt(&opt, devopt($2), ns("1"));
258 /* and the device part */
259 newdev($2, $3);
260 if ($3 == 0)
261 errx(1, "%s:%d: devices with zero units are not "
262 "likely to be correct", yyfile, yyline);
263 } |
264 NODEVICE Dev
265 = {
266 char *s = devopt($2);
267
268 rmopt(&opt, s);
269 free(s);
270 /* and the device part */
271 rmdev($2);

--- 21 unchanged lines hidden (view full) ---

293 nl->f_name = name;
294 STAILQ_INSERT_TAIL(&fntab, nl, f_next);
295}
296
297/*
298 * add a device to the list of devices
299 */
300static void
255 NODEVICE Dev
256 = {
257 char *s = devopt($2);
258
259 rmopt(&opt, s);
260 free(s);
261 /* and the device part */
262 rmdev($2);

--- 21 unchanged lines hidden (view full) ---

284 nl->f_name = name;
285 STAILQ_INSERT_TAIL(&fntab, nl, f_next);
286}
287
288/*
289 * add a device to the list of devices
290 */
291static void
301newdev(char *name, int count)
292newdev(char *name)
302{
303 struct device *np;
304
305 np = (struct device *) malloc(sizeof *np);
306 memset(np, 0, sizeof(*np));
307 np->d_name = name;
293{
294 struct device *np;
295
296 np = (struct device *) malloc(sizeof *np);
297 memset(np, 0, sizeof(*np));
298 np->d_name = name;
308 np->d_count = count;
309 STAILQ_INSERT_TAIL(&dtab, np, d_next);
310}
311
312/*
313 * remove a device from the list of devices
314 */
315static void
316rmdev(char *name)

--- 48 unchanged lines hidden ---
299 STAILQ_INSERT_TAIL(&dtab, np, d_next);
300}
301
302/*
303 * remove a device from the list of devices
304 */
305static void
306rmdev(char *name)

--- 48 unchanged lines hidden ---