All of lore.kernel.org
 help / color / mirror / Atom feed
* /sys: Network device status: link; Hard disks?
@ 2004-09-22 14:16 Nico Schottelius
  2004-09-22 14:19 ` Jesper Juhl
  0 siblings, 1 reply; 5+ messages in thread
From: Nico Schottelius @ 2004-09-22 14:16 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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

Hello everybody!

Will /sys provide details about link status of network cards
and can I also find out what devices are harddisks?

Like having /sys/block/hda/type, which contains "cd-rom" or
"harddisk" or similar. 

Or having something like /sys/class/net/eth0/link with 0/1 setting?

I know some or all information can be retrieved somehow differnt
(like using /proc), but shouldn't those be found in /sys?

Just some question on how we can use /sys useful.

Greetings,

Nico

PS: Please CC, I am not subscribed.

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

* Re: /sys: Network device status: link; Hard disks?
  2004-09-22 14:16 /sys: Network device status: link; Hard disks? Nico Schottelius
@ 2004-09-22 14:19 ` Jesper Juhl
  2004-09-22 22:25   ` Nico Schottelius
  0 siblings, 1 reply; 5+ messages in thread
From: Jesper Juhl @ 2004-09-22 14:19 UTC (permalink / raw)
  To: Nico Schottelius; +Cc: Linux Kernel Mailing List

On Wed, 22 Sep 2004, Nico Schottelius wrote:

> Date: Wed, 22 Sep 2004 16:16:30 +0200
> From: Nico Schottelius <nico-kernel@schottelius.org>
> To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
> Subject: /sys: Network device status: link; Hard disks?
> 
> Hello everybody!
> Will /sys provide details about link status of network cards
> and can I also find out what devices are harddisks?
> Like having /sys/block/hda/type, which contains "cd-rom" or
> "harddisk" or similar. 
> Or having something like /sys/class/net/eth0/link with 0/1 setting?
> I know some or all information can be retrieved somehow differnt
> (like using /proc), but shouldn't those be found in /sys?
> Just some question on how we can use /sys useful.
> Greetings,
> Nico
> PS: Please CC, I am not subscribed.
> 

Hmm, sounds nice to me. I don't know if something like 
/sys/class/net/eth0/link as you describe it would be accepted, but I've 
been wanting to play with sysfs for a while and this sounds like a nice 
and resonably simple little project, I will take a shot at trying to 
implement that.


--
Jesper Juhl



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

* Re: /sys: Network device status: link; Hard disks?
  2004-09-22 14:19 ` Jesper Juhl
@ 2004-09-22 22:25   ` Nico Schottelius
  2004-09-22 22:30     ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Nico Schottelius @ 2004-09-22 22:25 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Linux Kernel Mailing List

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

Jesper Juhl [Wed, Sep 22, 2004 at 04:19:06PM +0200]:
> On Wed, 22 Sep 2004, Nico Schottelius wrote:
> 
> > Date: Wed, 22 Sep 2004 16:16:30 +0200
> > From: Nico Schottelius <nico-kernel@schottelius.org>
> > To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
> > Subject: /sys: Network device status: link; Hard disks?
> > 
> > Hello everybody!
> > Will /sys provide details about link status of network cards
> > and can I also find out what devices are harddisks?
> > Like having /sys/block/hda/type, which contains "cd-rom" or
> > "harddisk" or similar. 
> > Or having something like /sys/class/net/eth0/link with 0/1 setting?
> > I know some or all information can be retrieved somehow differnt
> > (like using /proc), but shouldn't those be found in /sys?
> > Just some question on how we can use /sys useful.
> > Greetings,
> > Nico
> > PS: Please CC, I am not subscribed.
> > 
> 
> Hmm, sounds nice to me. I don't know if something like 
> /sys/class/net/eth0/link as you describe it would be accepted, but I've 
> been wanting to play with sysfs for a while and this sounds like a nice 
> and resonably simple little project, I will take a shot at trying to 
> implement that.

Perhaps there is a even a default method for network
device drivers to show their link status, but I don't know where
and having it in /sys seems senseful to me.

Anyway, is this the wrong list to ask questions about /sys or
where can I find information about what the sense of /sys is and
what it should and will contain?

Greetings,

Nico
-- 
Keep it simple & stupid, use what's available.
Please use pgp encryption: 8D0E 27A4 is my id.
http://nico.schotteli.us | http://linux.schottelius.org

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

* Re: /sys: Network device status: link; Hard disks?
  2004-09-22 22:25   ` Nico Schottelius
@ 2004-09-22 22:30     ` Stephen Hemminger
  2004-09-23  8:57       ` Jesper Juhl
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2004-09-22 22:30 UTC (permalink / raw)
  To: linux-kernel

You probably just want to expose the state of netif_carrier_ok (and netif_running).
Doing it in net-sysfs.c is trivial.  I was hoping someone else would learn something
and do it for me.

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

* Re: /sys: Network device status: link; Hard disks?
  2004-09-22 22:30     ` Stephen Hemminger
@ 2004-09-23  8:57       ` Jesper Juhl
  0 siblings, 0 replies; 5+ messages in thread
From: Jesper Juhl @ 2004-09-23  8:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: linux-kernel

On Wed, 22 Sep 2004, Stephen Hemminger wrote:

> Date: Wed, 22 Sep 2004 15:30:28 -0700
> From: Stephen Hemminger <shemminger@osdl.org>
> To: linux-kernel@vger.kernel.org
> Subject: Re: /sys: Network device status: link; Hard disks?
> 
> You probably just want to expose the state of netif_carrier_ok (and netif_running).
> Doing it in net-sysfs.c is trivial.  I was hoping someone else would learn something
> and do it for me.

That is exactely what I've started to do, but it's taking me a little 
while since I have limited time and have to learn about sysfs first. But 
it's a nice learning experience and I'll post a patch as soon as I have 
something that works resonably, but it might take me a few days.


--
Jesper Juhl


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

end of thread, other threads:[~2004-09-23  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 14:16 /sys: Network device status: link; Hard disks? Nico Schottelius
2004-09-22 14:19 ` Jesper Juhl
2004-09-22 22:25   ` Nico Schottelius
2004-09-22 22:30     ` Stephen Hemminger
2004-09-23  8:57       ` Jesper Juhl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.