9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] query the fs about its config
Date: Mon, 25 Feb 2002 09:55:54 -0500	[thread overview]
Message-ID: <aae7fefb6fe0ab1368453b8e5a6ec7e9@plan9.bell-labs.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

I clearly didn't read the original message.  Looks like
someone already added it to ours version of the file
server, probably jmk.  It's called printconf.

Here's the relevant routines.  You can snarf and paste
to the current code.  Hopefully we'll get the full
version out there soon:

from config.c:

void
cmd_printconf(int, char *[])
{
	char *p, *s;
	Iobuf *iob;

	iob = getbuf(confdev, 0, Bread);
	if(iob == nil)
		return;
	if(checktag(iob, Tconfig, 0)){
		putbuf(iob);
		return;
	}

	print("config %s\n", nvrgetconfig());
	s = p = iob->iobuf;
	while(*p != 0 && p < iob->iobuf+BUFSIZE){
		if(*p++ != '\n')
			continue;
		print("%.*s", (int)(p-s), s);
		s = p;
	}
	if(p != s)
		print("%.*s", (int)(p-s), s);
	print("end\n");

	putbuf(iob);
}


 From auth.c


char*
nvrgetconfig(void)
{
	return nvr.config;
}

 From con.c's command table

	cmd_install("printconf", "-- print configuration", cmd_printconf);


[-- Attachment #2: message.txt --]
[-- Type: message/rfc822, Size: 3239 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 97 bytes --]

Depends on what you mean by its config

cat '#P'/ioalloc
cat '#P'/irqalloc
cat '#c'/drivers

[-- Attachment #2.1.2: message.txt --]
[-- Type: message/rfc822, Size: 1519 bytes --]

From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: [9fans] query the fs about its config
Date: Mon, 25 Feb 2002 09:56:37 +0100
Message-ID: <20020225085709.D5E3A199EC@mail.cse.psu.edu>

Shouldn't the fs kernel have a `showconfig' or something
like that to print its config? 

I may try to change the source of my ide fs kernel to let it
do that; but that depends on how much spare time I can get for
this.


             reply	other threads:[~2002-02-25 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25 14:55 presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-02-25 14:28 Fco.J.Ballesteros
2002-02-25 14:25 presotto
2002-02-25  8:56 Fco.J.Ballesteros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aae7fefb6fe0ab1368453b8e5a6ec7e9@plan9.bell-labs.com \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).