Julian Fagir | 9 Sep 2011 15:56
Picon

Patch: Use fstab different to /etc/fstab in fstab.h

Hi,

in a case where it would be useful to read a fstab that is not the system's
own one (sysinst), i.e. lies not /etc/fstab, you can't do that with fstab.h.

The solution would be to have a function setfstab(const char*) do set the
fstab you want to read. The code is about 20 lines of additional code + some
documentation.
Rewriting that for a userland program would need either copying nearly the
whole fstab.c or changing the interface, which is not wanted.

Appended are patches (fstab.h.diff, fstab.c.diff, fstab.3.diff) and a test
program (fstab-test.file, fstab-test.c, Makefile). To test it locally, just
copy over fstab.c, apply the patch and change the include to a local include.
Then run make and execute fstab-test. It will show the mount point of a
directory according to your and the delivered fstab.

So far, the test was run on two systems, one 5.99.55, one 5.0.2 (thanks to
dzoe).

I fully understand objections that it's unnecessary bloat and only used in
that single case.
Then I would rather copy fstab.c and modify that code to fit my needs.

Regards, Julian
Attachment (Makefile): application/octet-stream, 49 bytes
Attachment (fstab.c.diff): text/x-patch, 799 bytes
Attachment (fstab.h.diff): text/x-patch, 491 bytes
Attachment (fstab-test.c): text/x-csrc, 497 bytes
(Continue reading)

Thor Lancelot Simon | 9 Sep 2011 16:06
Picon
Favicon

Re: Patch: Use fstab different to /etc/fstab in fstab.h

On Fri, Sep 09, 2011 at 03:56:50PM +0200, Julian Fagir wrote:
> Hi,
> 
> in a case where it would be useful to read a fstab that is not the system's
> own one (sysinst), i.e. lies not /etc/fstab, you can't do that with fstab.h.
> 
> The solution would be to have a function setfstab(const char*) do set the
> fstab you want to read. The code is about 20 lines of additional code + some
> documentation.

I don't think this is the right way.  What if sysinst (or some future
installer or partition editor) became multi-threaded?

I think it would be better to reimplement the functions that use fstab
in terms of new _r variants that take an explicit fstab argument.

David Young | 11 Sep 2011 19:04
Picon
Favicon

web inherits UNIX console?

An idea that I keep turning over in my head and cannot put to rest is
that the web already has a lot better console abstraction, in the form
of DOM, than the glass teletype that UNIX uses now.  Maybe we should
switch?

Another idea I'm mulling is that web stuff like HTML5 (Canvas) + SVG
will eventually add up to a graphics console with a lot more seats,
portability, and capability than X11.

Thoughts?

Dave

--

-- 
David Young             OJC Technologies
dyoung <at> ojctech.com      Urbana, IL * (217) 344-0444 x24

Mouse | 11 Sep 2011 19:38

Re: web inherits UNIX console?

> An idea that I keep turning over in my head and cannot put to rest is
> that the web already has a lot better console abstraction, in the
> form of DOM, than the glass teletype that UNIX uses now.  Maybe we
> should switch?

I don't know the DOM.  What would this mean for consoles from the OS's
point of view, and what would it mean from the user's point of view?
For example, would it become impossible to use serial console?

> Another idea I'm mulling is that web stuff like HTML5 (Canvas) + SVG
> will eventually add up to a graphics console with a lot more seats,
> portability, and capability than X11.

Having to use something as insanely overweight as a Web browser for a
console seat is a complete non-starter for me.  X is a bit heavyweight,
but furrfu, Web browsers make X look positively minimalist.

Whether that matters to you (for any value of "you"), of course, is
not, of course, for me to say.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Martin Husemann | 11 Sep 2011 21:54
Picon

Re: web inherits UNIX console?

On Sun, Sep 11, 2011 at 12:04:11PM -0500, David Young wrote:
> An idea that I keep turning over in my head and cannot put to rest is
> that the web already has a lot better console abstraction, in the form
> of DOM, than the glass teletype that UNIX uses now.  Maybe we should
> switch?

Sorry, I can't follow. I can write JS code to create a table, add it as
a childeNode to some div and fill in all of autoconfig output there -
but I'm sure you do not mean to replace aprint_* calls in our drivers
with such code.

So what do you mean? I guess "console" does mean something very different
to you in this context than to me...

Martin

David Young | 12 Sep 2011 17:17
Picon
Favicon

Re: web inherits UNIX console?

On Sun, Sep 11, 2011 at 09:54:19PM +0200, Martin Husemann wrote:
> On Sun, Sep 11, 2011 at 12:04:11PM -0500, David Young wrote:
> > An idea that I keep turning over in my head and cannot put to rest is
> > that the web already has a lot better console abstraction, in the form
> > of DOM, than the glass teletype that UNIX uses now.  Maybe we should
> > switch?
> 
> Sorry, I can't follow. I can write JS code to create a table, add it as
> a childeNode to some div and fill in all of autoconfig output there -
> but I'm sure you do not mean to replace aprint_* calls in our drivers
> with such code.
> 
> So what do you mean? I guess "console" does mean something very different
> to you in this context than to me...

I guess that my meaning was more at "terminal" than "console."

I'm asking for you to imagine what would be possible if the display and
input capabilities of a terminal were the capabilities of a web browser
instead of a glass teletype.

Dave

--

-- 
David Young             OJC Technologies
dyoung <at> ojctech.com      Urbana, IL * (217) 344-0444 x24

Martin Husemann | 12 Sep 2011 17:25
Picon

Re: web inherits UNIX console?

On Mon, Sep 12, 2011 at 10:17:29AM -0500, David Young wrote:
> I'm asking for you to imagine what would be possible if the display and
> input capabilities of a terminal were the capabilities of a web browser
> instead of a glass teletype.

Oh, like Display PostScript you mean - ok. But most of my consoles run over
a serial line (even if we have 2011, I know).

Martin

Ignatios Souvatzis | 12 Sep 2011 17:47
Picon
Favicon

Re: web inherits UNIX console?

On Mon, Sep 12, 2011 at 05:25:30PM +0200, Martin Husemann wrote:
> On Mon, Sep 12, 2011 at 10:17:29AM -0500, David Young wrote:
> > I'm asking for you to imagine what would be possible if the display and
> > input capabilities of a terminal were the capabilities of a web browser
> > instead of a glass teletype.
> 
> Oh, like Display PostScript you mean - ok. But most of my consoles run over
> a serial line (even if we have 2011, I know).

Like plan9?

	-is

Mouse | 12 Sep 2011 17:56

Re: web inherits UNIX console?

> I'm asking for you to imagine what would be possible if the display
> and input capabilities of a terminal were the capabilities of a web
> browser instead of a glass teletype.

Given what's been done with that potential in the case of Web browsers,
I find it hard to imagine any such future I would consider an
improvement over serial lines, much less over what we have now.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Jukka Ruohonen | 12 Sep 2011 18:16
Picon
Picon
Favicon

Re: web inherits UNIX console?

On Sun, Sep 11, 2011 at 12:04:11PM -0500, David Young wrote:
> An idea that I keep turning over in my head and cannot put to rest is
> that the web already has a lot better console abstraction, in the form
> of DOM, than the glass teletype that UNIX uses now.  Maybe we should
> switch?

I don't quite like web browsers either, but as a R user/programmer, I find
your earlier example of

	cat foo | boxplot

more than intriguing.

- Jukka.


Gmane