ping ping ping: Bug or Feature - that's the question :-)]

Anybody any comment ???

-------- Original Message --------
Betreff: Bug or Feature - that’s the question :slight_smile:
Datum: Sun, 23 Jul 2000 13:25:55 +0200
Von: Jörg Kampmann <joerg.kampmann@ibk-consult.de>
Firma: IBK-Consult, D-31228 Peine
Foren: comp.os.qnx

Hi

I am using more than one disk for operation with QNX 4. And I
moved the whole /usr directory to the second disk. And I created
a link to the second disk, e.g.:

ln -fsv /disk2/usr /usr

in the root directory of disk1

This sometimes generates warnings or even errors, in particular when I
try to update my system from the QSSL CD-Rom.

Now I used an environment variable:

export QSSL_HOST=/

this generated strange behaviour for the (e.g.) ‘ls’ and others and it
reported me that it did not find (ls $QSSL_HOST/usr/whatever)

//usr/whatever

when I modified the above environment variable to

export QSSL_HOST=

it works fine and no further problem occurs

Question:

is this a shell/Fsys bug or feature ?

an answer might be interesting … :slight_smile:

Joerg Kampmann
IBK-Consult - (embedded Systems)
WWW: http://www.ibk-consult.de

J?rg Kampmann <joerg.kampmann@ibk-consult.de> wrote:

Anybody any comment ???

i think you are getting hit with the ‘super’ root thing…

/ → root filesystem
//x → root filesystem for node x

//usr is an invalid path (in QNX) because of the //x syntax

when the shell sees a path starting with // it expects
a node number.

when the shell sees a path starting with /// it collaspes
that to just / (this usually happens with // on other os’s)

try export QSSL_HOST=///

that way you when something goes to tack on to it, it will
never be just //

ie. it will work for:
$QSSL_HOST → /// → /
$QSSL_HOST/ → //// → /
$QSSL_HOST/usr → ////usr → /usr

Previously, Jörg Kampmann wrote in comp.os.qnx:

I am using more than one disk for operation with QNX 4. And I
moved the whole /usr directory to the second disk. And I created
a link to the second disk, e.g.:

ln -fsv /disk2/usr /usr

in the root directory of disk1

This should be fine.

This sometimes generates warnings or even errors, in particular when I
try to update my system from the QSSL CD-Rom.

What warnings and errors?

If /etc/install truly does require this not to be a symlink, which
would surprise me (but I get surprised all the time) then you
can make this a prefix, which is much closer to invisible. In your
sysinit:

prefix -A /usr=/disk2/usr

Now I used an environment variable:

export QSSL_HOST=/

this generated strange behaviour for the (e.g.) ‘ls’ and others and it
reported me that it did not find (ls $QSSL_HOST/usr/whatever)

//usr/whatever

when I modified the above environment variable to

export QSSL_HOST
it works fine and no further problem occurs

Question:

is this a shell/Fsys bug or feature ?

Feature.

The environment variable is irrelevant, the
way you use it generates an illegal path, but you can generate that
path in other ways and it’ll still be illegal.

When a path begins with “//” it is a network-rooted path, i.e. the
next component in the path is expected to be a node number:

//4/usr/local

A node of 0 is your node:

//0/usr/local

and a missing node is your node:

///usr/local

but you’ve placed “usr” in the node position:

//usr/local

usr clearly isn’t a node.

Cheers,
Sam


Sam Roberts (sam@cogent.ca), Cogent Real-Time Systems (www.cogent.ca)