9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] libc struct Dir field type
@ 2014-10-19 12:30 Carsten Kunze
  2014-10-19 15:32 ` Charles Forsyth
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Kunze @ 2014-10-19 12:30 UTC (permalink / raw)
  To: 9fans

Hello,

where is the type field of libc struct Dir documented?  In source I found a compare of field type with the char 'M'.  Where can I loop up what 'M' means?

    Carsten



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

* Re: [9fans] libc struct Dir field type
  2014-10-19 12:30 [9fans] libc struct Dir field type Carsten Kunze
@ 2014-10-19 15:32 ` Charles Forsyth
  2014-10-19 15:36   ` Charles Forsyth
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Forsyth @ 2014-10-19 15:32 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On 19 October 2014 13:30, Carsten Kunze <carsten.kunze@arcor.de> wrote:

> where is the type field of libc struct Dir documented?  In source I found
> a compare of field type with the char 'M'.  Where can I loop up what 'M'
> means?
>


It's the Unicode character used to identify the device driver within a
kernel,
and are part of the device driver's Dev value. Only a few have any sort of
global
significance, and even that's probably a mistake.

cat /dev/drivers
for the map currently in use. /sys/src/9/port/master tries to keep track of
them,
but as you'll see some characters are used for several devices (not in use
simultaneously in the same kernel)

[-- Attachment #2: Type: text/html, Size: 1334 bytes --]

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

* Re: [9fans] libc struct Dir field type
  2014-10-19 15:32 ` Charles Forsyth
@ 2014-10-19 15:36   ` Charles Forsyth
  2014-10-19 15:38     ` Charles Forsyth
  2014-10-19 16:01     ` Carsten Kunze
  0 siblings, 2 replies; 5+ messages in thread
From: Charles Forsyth @ 2014-10-19 15:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On 19 October 2014 16:32, Charles Forsyth <charles.forsyth@gmail.com> wrote:

> Only a few have any sort of global
> significance, and even that's probably a mistake.
>

Ignore that: that statement's wrong since they appear in bind operations in
bind(1), bind(2), /lib/namespace and similar contexts.

I also forgot to add that ls -l shows you the type character: ls -l /dev
shows you where different names are produced.

[-- Attachment #2: Type: text/html, Size: 914 bytes --]

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

* Re: [9fans] libc struct Dir field type
  2014-10-19 15:36   ` Charles Forsyth
@ 2014-10-19 15:38     ` Charles Forsyth
  2014-10-19 16:01     ` Carsten Kunze
  1 sibling, 0 replies; 5+ messages in thread
From: Charles Forsyth @ 2014-10-19 15:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On 19 October 2014 16:36, Charles Forsyth <charles.forsyth@gmail.com> wrote:

> Only a few have any sort of global
> significance, and even that's probably a mistake.
>

What I really meant was that few programs care about Dir.type since most
don't care what serves the names
as long as they behave as expected. Relatively few programs use the # names
directly in bind(2) calls:
it's more common to set up a name space and then invoke a program.

[-- Attachment #2: Type: text/html, Size: 907 bytes --]

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

* Re: [9fans] libc struct Dir field type
  2014-10-19 15:36   ` Charles Forsyth
  2014-10-19 15:38     ` Charles Forsyth
@ 2014-10-19 16:01     ` Carsten Kunze
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Kunze @ 2014-10-19 16:01 UTC (permalink / raw)
  To: 9fans

> On 19 October 2014 16:36, Charles Forsyth <charles.forsyth@gmail.com>
> wrote:
>
> What I really meant was that few programs care about Dir.type since most
> don't care what serves the names
> as long as they behave as expected. Relatively few programs use the # names
> directly in bind(2) calls:
> it's more common to set up a name space and then invoke a program.

Thank you for your in-depth information!

   Carsten



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

end of thread, other threads:[~2014-10-19 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 12:30 [9fans] libc struct Dir field type Carsten Kunze
2014-10-19 15:32 ` Charles Forsyth
2014-10-19 15:36   ` Charles Forsyth
2014-10-19 15:38     ` Charles Forsyth
2014-10-19 16:01     ` Carsten Kunze

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).