Page MenuHomeFreeBSD

Create files.x86
ClosedPublic

Authored by imp on Sat, Aug 10, 10:39 PM.

Details

Summary

files.x86 is for the parts of the system that are common to both i386 and amd64
due too their nature. First up, to get the ball rolling, is fdc, the floppy disk
support. It works only on amd64 and i386 these days, and that's unlikely to
change.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

imp created this revision.Sat, Aug 10, 10:39 PM
imp added a reviewer: jhb.Sat, Aug 10, 10:40 PM

This commit is purposely thin to get the framework up and going so we can focus on framework issues.

cem accepted this revision.Sat, Aug 10, 11:30 PM
cem added a subscriber: cem.

LGTM if it works (is fdc in GENERIC?)

This revision is now accepted and ready to land.Sat, Aug 10, 11:30 PM
jhb accepted this revision.Mon, Aug 12, 5:01 PM

Ah, I had thought we would use 'include' in files.i386 and files.amd64 rather than DEFAULTS, but either way is fine with me.

imp added a comment.Mon, Aug 12, 5:27 PM
In D21210#461467, @jhb wrote:

Ah, I had thought we would use 'include' in files.i386 and files.amd64 rather than DEFAULTS, but either way is fine with me.

I would have, except that no such directive exists inside of files* files. config is annoyingly non-orthogonal.

jhb added a comment.Mon, Aug 12, 5:56 PM

Oh, I thought it seemed to be there from the code I read on Friday:

static void
read_file(char *fname)
{
...
	/*
	 * include "filename"
	 * filename    [ standard | optional ]
	 *	[ dev* [ | dev* ... ] | profiling-routine ] [ no-obj ]
	 *	[ compile-with "compile rule" [no-implicit-rule] ]
	 *      [ dependency "dependency-list"] [ before-depend ]
	 *	[ clean "file-list"] [ warning "text warning" ]
	 *	[ obj-prefix "file prefix"]
	 */
...
	if (eq(wd, "include")) {
		wd = get_quoted_word(fp);
		if (wd == (char *)EOF || wd == NULL)
			errout("%s: missing include filename.\n", fname);
		(void) snprintf(ifname, sizeof(ifname), "../../%s", wd);
		read_file(ifname);
		while (((wd = get_word(fp)) != (char *)EOF) && wd)
			;
		goto next;
	}
imp added a comment.Mon, Aug 12, 6:05 PM
In D21210#461496, @jhb wrote:

Oh, I thought it seemed to be there from the code I read on Friday:

static void
read_file(char *fname)
{
...
	/*
	 * include "filename"
	 * filename    [ standard | optional ]
	 *	[ dev* [ | dev* ... ] | profiling-routine ] [ no-obj ]
	 *	[ compile-with "compile rule" [no-implicit-rule] ]
	 *      [ dependency "dependency-list"] [ before-depend ]
	 *	[ clean "file-list"] [ warning "text warning" ]
	 *	[ obj-prefix "file prefix"]
	 */
...
	if (eq(wd, "include")) {
		wd = get_quoted_word(fp);
		if (wd == (char *)EOF || wd == NULL)
			errout("%s: missing include filename.\n", fname);
		(void) snprintf(ifname, sizeof(ifname), "../../%s", wd);
		read_file(ifname);
		while (((wd = get_word(fp)) != (char *)EOF) && wd)
			;
		goto next;
	}

oh my! It's completely unused in the tree then...

seems to work though, so I'll switch.

imp updated this revision to Diff 60685.Mon, Aug 12, 6:15 PM

Update to use include more directly, per jhb

This revision now requires review to proceed.Mon, Aug 12, 6:15 PM
jhb accepted this revision.Mon, Aug 12, 10:06 PM
This revision is now accepted and ready to land.Mon, Aug 12, 10:06 PM
Closed by commit rS350965: Create files.x86 (authored by imp). · Explain Why
This revision was automatically updated to reflect the committed changes.