9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] devfs.c and configuration files
@ 2003-10-16 21:20 mirtchov
  2003-10-17  0:28 ` andrey mirtchovski
  2003-10-17  8:33 ` Fco.J.Ballesteros
  0 siblings, 2 replies; 3+ messages in thread
From: mirtchov @ 2003-10-16 21:20 UTC (permalink / raw)
  To: 9fans, 9trouble

I tried putting the devfs configuration on disk, but ran into major
problems reading it back from there.  The diff included fixes a few of
those:

	1.  The config file _must_ begin with "fsdev:\n".  This
	feature is undocumented and not really necessary -- for
	example it makes the man page example

		cp /dev/fs/ctl /dev/fd0disk

	not work at all.  I've left it in because I don't know why it
	was there in the first place.

	2.  A double free in rdconf()

	3.  The parser doesn't deal with empty lines -- it will flag
	an error, the error handling routine will sed 'configed = 1',
	so the next "bind -a '#k' /dev" will work, just not the first
	one.  We all know how important it is for other Plan 9
	utilities that configuration files and scripts end in a
	newline, so I've changed it to handle it properly.

andrey

------


plan9% yesterday -d /sys/src/9/port/devfs.c
diff /n/dump/2003/1016/sys/src/9/port/devfs.c /sys/src/9/port/devfs.c
270c270
< 		error("Bad config");
---
> 		error("Bad config: should begin with: fsdev\\n");
276a277,280
> 		if (e == p) {
> 			e++;
> 			continue;
> 		}
280d283
< 	free(s);
plan9%




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-17  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 21:20 [9fans] devfs.c and configuration files mirtchov
2003-10-17  0:28 ` andrey mirtchovski
2003-10-17  8:33 ` Fco.J.Ballesteros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).